[issue29042] os.path.exists should not throw "Embedded NUL character" exception
STINNER Victor
report at bugs.python.org
Mon Dec 18 09:36:01 EST 2017
STINNER Victor <victor.stinner at gmail.com> added the comment:
> A path containing an embedded NUL character simply cannot name an existing file, and therefore os.path.exists should return False for such a path.
I disagree. Python doesn't call the syscall and so must raise a different exception.
You must not pass a path with embedded NULL character/byte. That's all.
Write your own wrapper to os.path.exists() if you want to a different behaviour.
----------
nosy: +vstinner
resolution: -> not a bug
stage: -> resolved
status: open -> closed
_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue29042>
_______________________________________
More information about the Python-bugs-list
mailing list