Vedran Čačić <ved...@gmail.com> added the comment:

I think the real issue here

> mypath = PurePosixPath(normpath(mypath))

is the PurePosixPath wrapper. It is nice that normpath _accepts_ pathlike 
objects, but it should then not return a generic str. It should try to return 
an object of the same type.

Of course it's harder to do, especially in presence of pathlike objects of 
unknown classes, but with some reasonable assumptions on the constructors, it 
can be done---and it's much more useful. The similar debate, with similar 
conclusions, has already happened with datetime-like objects.

----------
nosy: +veky

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

Reply via email to