Eric V. Smith <e...@trueblade.com> added the comment:
I don't know of any OS that supports NULs in filenames (not that my knowledge is encyclopedic). My reason for suggesting we document it is that os.path.exists() returns False for otherwise invalid filenames, where something like open() raises. On Windows: >>> os.path.exists('c::bar') False >>> open('c::bar') Traceback (most recent call last): File "<stdin>", line 1, in <module> OSError: [Errno 22] Invalid argument: 'c::bar' So I do think it's a little surprising that os.path.exists() would raise with a NUL, instead of returning False. But I don't think it's worth changing the behavior, due to potential (though unlikely) breakage. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue33721> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com