[Python-Dev] When should pathlib stop being provisional?
Serhiy Storchaka
storchaka at gmail.com
Wed Apr 6 01:57:12 EDT 2016
More information about the Python-Dev mailing list
Wed Apr 6 01:57:12 EDT 2016
- Previous message (by thread): [Python-Dev] When should pathlib stop being provisional?
- Next message (by thread): [Python-Dev] When should pathlib stop being provisional?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
On 06.04.16 05:44, Nick Coghlan wrote: > The most promising option for that is probably "getattr(path, 'path', > path)", since the "path" attribute is being added to pathlib, and the > given idiom can be readily adopted in Python 2/3 compatible code > (since normal strings and any other object without a "path" attribute > are passed through unchanged). Alternatively, since it's a protocol, > double-underscores on the property name may be appropriate (i.e. > "getattr(path, '__path__', path)") This was already discussed. Current conclusion is using the "path" attribute. See http://bugs.python.org/issue22570 .
- Previous message (by thread): [Python-Dev] When should pathlib stop being provisional?
- Next message (by thread): [Python-Dev] When should pathlib stop being provisional?
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list