On 2018-06-01, Steven D'Aprano <[email protected]> wrote:
> But since "\0" is the correct type (a string), and the fact that it
> happens to be illegal on POSIX is a platform-dependent detail of no more
> importance than the fact that "?" is illegal on Windows, it should be
> treated as any other platform-dependent illegal file and return False.
That sounds reasonable.
What about the case where somebody calls
os.path.exists("/tmp/foo\x00bar")
If /tmp/foo exists should it return True? That's what would happen if
you passed that string directly to the libc call.
--
Grant
--
https://mail.python.org/mailman/listinfo/python-list