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/143851.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
Sat Apr 9 11:39:30 EDT 2016
On 04/09/2016 07:32 AM, Nikolaus Rath wrote:
> On Apr 07 2016, Donald Stufft <donald at stufft.io> wrote:
>>> On Apr 7, 2016, at 6:48 AM, Nikolaus Rath <Nikolaus at rath.org> wrote:
>>>
>>> Does anyone anticipate any classes other than those from pathlib to come
>>> with such a method?
>>
>>
>> It seems like it would be reasonable for pathlib.Path to call fspath on the
>> path passed to pathlib.Path.__init__, which would mean that if other libraries
>> implemented __fspath__ then you could pass their path objects to pathlib and
>> it would just work (and similarly, if they also called fspath it would enable
>> interoperation between all of the various path libraries).
>
> Indeed, but my question is: is this actually going to happen? Are there
> going to be other libraries that will implement __fspath__, and will
> there be demand for pathlib to support them?

There will be at least one.  :)

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