MCPcopy Index your code
hub / github.com/numpy/numpy / _iswritemode

Method _iswritemode

numpy/lib/_datasource.py:269–274  ·  view source on GitHub ↗

Test if the given mode will open a file for writing.

(self, mode)

Source from the content-addressed store, hash-verified

267 return ext in _file_openers.keys()
268
269 def _iswritemode(self, mode):
270 """Test if the given mode will open a file for writing."""
271
272 # Currently only used to test the bz2 files.
273 _writemodes = ("w", "+")
274 return any(c in _writemodes for c in mode)
275
276 def _splitzipext(self, filename):
277 """Split zip extension from filename and return filename.

Callers 1

openMethod · 0.95

Calls 1

anyFunction · 0.85

Tested by

no test coverage detected