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/143749.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:31:27 EDT 2016
On 04/06/2016 11:15 PM, Greg Ewing wrote:
> Chris Barker - NOAA Federal wrote:
>> But fspath(), if it exists, would call __fspath__ on an arbitrary
>> object, and create a new string -- not a new Path. That may be
>> confusing...
>
> Maybe something like fspathstr/__fspathstr__ would be better?

As someone already said, we don't need to embed the type in the name.

The point of the __os_path__ protocol is to return the serialized 
version of the Path the object represents.  This would be somewhat 
similar to the various __reduce*__ protocols (which I thought had 
something to do with adding until I learned what they were for).

--
~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