MCPcopy Create free account
hub / github.com/numpy/numpy / _iswritemode

Method _iswritemode

numpy/lib/_datasource.py:270–278  ·  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

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

Callers 1

openMethod · 0.95

Calls

no outgoing calls

Tested by

no test coverage detected