A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2016-May/144515.html below:

[Python-Dev] file system path protocol PEP

[Python-Dev] file system path protocol PEP [Python-Dev] file system path protocol PEPSerhiy Storchaka storchaka at gmail.com
Wed May 11 16:44:36 EDT 2016
On 11.05.16 19:43, Brett Cannon wrote:
> os.path
> '''''''
>
> The various path-manipulation functions of ``os.path`` [#os-path]_
> will be updated to accept path objects. For polymorphic functions that
> accept both bytes and strings, they will be updated to simply use
> code very much similar to
> ``path.__fspath__() if  hasattr(path, '__fspath__') else path``. This
> will allow for their pre-existing type-checking code to continue to
> function.

I afraid that this will hit a performance. Some os.path functions are 
used in tight loops, they are hard optimized, and adding support of path 
protocol can have visible negative effect.

I suggest first implement other changes and then look whether it is 
worth to add support of path protocol in os.path functions.


More information about the Python-Dev mailing list

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4