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-April/143750.html below:

[Python-Dev] Defining a path protocol

[Python-Dev] Defining a path protocol [Python-Dev] Defining a path protocolEthan Furman ethan at stoneleaf.us
Thu Apr 7 02:34:27 EDT 2016
On 04/06/2016 10:26 AM, Brett Cannon wrote:

>  2. Method or attribute? (changes what kind of one-liner you might use
>     in libraries, but I think historically all protocols have been
>     methods and the serialized string representation might be costly to
>     build)

Having thought about this some more, it seems we have enough __dunder__ 
attributes that are plain strings that having this one also be a plain 
string should not be a problem:

- __name__
- __module__
- __file__

Since Paths are immutable the __os_path__ attribute isn't going to 
change and doesn't need to be a method.

--
~Ethan~

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