R. David Murray added the comment: Yeah, to os.path, paths are just strings, and there's no reference made to the actual file system. The blanks are valid on unix, for example (unless you pass them to the shell without escaping them). As Steve indicated, parts of Pathlib might make a different decision about that, but os.path...can't really, and still remain a mostly-portable API (not to mention backward compatibility).
Or, to look at this another way, Python is giving you exactly the errors that you would get from Windows itself if you passed it the strings you are passing it, and no more. Python is faithfully constructing those strings according to *string* rules, and it is Windows that is transforming *some* of them into other strings. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue22744> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com