On 05/12/2016 01:31 AM, Sven R. Kunze wrote:
I think the "Rationale" section ignores the fact the Path also supports the .path attribute now. Which indeed defines a common interface between path objects.
The version of Python that has Path.path has not been released yet. And even so, .path is not a "common interface" as neither str nor bytes have it, and they also are used as path objects.
And even given all that, for smoother interoperability with the rest of the stdlib, or at least the os.* portion, those functions would still need to be upgraded to check for .path on the incoming arguments -- at which point we may as well make a protocol to properly support file system paths instead of relying on the rather generic attribute name of 'path'.
-- ~Ethan~ _______________________________________________ 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