Barney Gale <barney.g...@gmail.com> added the comment:

The only design flaw mentioned in that thread is that `os.path.expanduser()` 
returns the input unchanged if expansion fails, which is not very pythonic. 
However, such a problem doesn't necessitate a rewrite of 
`os.path.expanduser()`. Checking `result[:1]` is enough.

I think there's also a difference in the Windows heuristic in that pathlib 
checks whether `basename(%HOMEPATH%) == %USERNAME%` whereas `ntpath.expanduser` 
doesn't. But if that's really an issue it should probably be fixed in `ntpath` 
IMO, rather than having divergent implementations.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue39899>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to