STINNER Victor added the comment:
I like ntpath_cleanup.diff, I don't think that it makes the code worse.
FYI os.fsencode() accepts str too, you can simplify:
if isinstance(path, bytes):
- userhome = userhome.encode(sys.getfilesystemencoding())
+ userhome = os.fsencode(userhome)
to
+ userhome = os.fsencode(userhome)
----------
nosy: +haypo
_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue15275>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe:
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com