MCPcopy Create free account
hub / github.com/eshirazi/python-with-braces / _PyFile_SanitizeMode

Function _PyFile_SanitizeMode

Objects/fileobject.c:272–316  ·  view source on GitHub ↗

check for known incorrect mode strings - problem is, platforms are free to accept any mode characters they like and are supposed to ignore stuff they don't understand... write or append mode with universal newline support is expressly forbidden by PEP 278. Additionally, remove the 'U' from the mode string as platforms won't know what it is. Non-zero return signals an exception */

Source from the content-addressed store, hash-verified

source not stored for this graph (policy: none)

Callers 2

posix_fdopenFunction · 0.85
fileobject.cFile · 0.85

Calls 3

PyErr_SetStringFunction · 0.85
PyErr_FormatFunction · 0.85
_PyVerify_Mode_WINNTFunction · 0.85

Tested by

no test coverage detected