Eric Snow wrote:
All this matters because it impacts the value returned from
__ospath__().  Should it return the string representation of the path
for the current OS or some standardized representation?

What standardized representation? I'm not aware of such
a thing.

I'd expect
the former.  However, if that is the expectation then something like
pathlib.PureWindowsPath will give you the wrong thing if your current
OS is linux.

No, you should get the representation corresponding to
the kind of path object you started with. If you're
working with Windows path objects on a Unix system,
they must be representing something on some Windows
system somewhere, not the one you're running the code
on. The only reason to ask for a string representation
of such a path is for use by that other system.

I don't think it even makes sense to ask for a Unix
representation of a Windows path or vice versa, because
the semantics are different. How do you translate a
Windows drive letter into Unix? What drive letter do
you use for an absolute Unix path?

--
Greg
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to