STINNER Victor 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 pa
Christoph Reiter added the comment:
Raising in case no valid path is passed seems fine to me. There are other cases
where it fails:
python3 -c "import os; os.path.exists('\ud83d')"
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python3.5/genericpath.py", line 19, in
New submission from Dolda2000:
Currently, calling os.path.exists on a path which contains NUL characters
behaves consistently with most file-system calls by throwing an exception:
>>> os.path.exists('\0')
Traceback (most recent call last):
File "", line 1, in
File "/usr/lib/python3.5/gener