Antony Lee <anntzer....@gmail.com> added the comment:

Immutability and hashability are listed first among "general properties" of 
paths (https://docs.python.org/3/library/pathlib.html#general-properties), and 
in the PEP proposing pathlib 
(https://www.python.org/dev/peps/pep-0428/#immutability).  Looking at it again 
I *guess* the docs version could be read as only guaranteeing this for 
PurePaths (because that's in the PurePath section) rather than Path, but the 
PEP version clearly implies that this is true for both PurePaths and concrete 
Paths.

It may be tricky to check usage in third-party packages, given that one would 
need to look for `with <path-object>: ...` rather than, say, a method name 
which can be grepped.  Do you have any suggestions here?

----------

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

Reply via email to