On 06.04.16 05:44, Nick Coghlan wrote:
The next challenge would then be to make a list of APIs to be updated
for 3.6 to implicitly accept "rich path" objects via the agreed
convention, with pathlib.PurePath used as a test class:
* open()
* codecs.open() (et al)
* io.*
* os.path.*
* other os functions
* shutil.*
* tempfile.*
* shelve.*
* csv.*
Not sure about os.path.*. The purpose of os.path module is manipulating
string paths. From the perspective of pathlib it can look lower level.
Supporting pathlib.Path will complicate and slow down os.path functions
(they are already more complex and slow than were in Python 2). Since
os.path functions often called several times in a loop, their
performance is important. On other hand, some Path methods are more
efficient than os.path functions, and Path specialized code at higher
level can be more preferable.
_______________________________________________
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