Chris Angelico wrote:
A Unix path name cannot contain a null byte, so what you have is a fundamentally invalid name. ValueError is perfectly acceptable.
It would also make sense for it could simply return False, since a file with such a name can't exist. This is analogous to the way comparing objects of different types for equality returns False instead of raising an exception. -- Greg -- https://mail.python.org/mailman/listinfo/python-list