[Python-Dev] Defining a path protocol
Nikolaus Rath
Nikolaus at rath.org
Sat Apr 9 10:32:28 EDT 2016
More information about the Python-Dev mailing list
Sat Apr 9 10:32:28 EDT 2016
- Previous message (by thread): [Python-Dev] Defining a path protocol
- Next message (by thread): [Python-Dev] Defining a path protocol
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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? Best, -Nikolaus -- GPG encrypted emails preferred. Key id: 0xD113FCAC3C4E599F Fingerprint: ED31 791B 2C5C 1613 AF38 8B8A D113 FCAC 3C4E 599F »Time flies like an arrow, fruit flies like a Banana.« -------------- next part -------------- A non-text attachment was scrubbed... Name: signature.asc Type: application/pgp-signature Size: 997 bytes Desc: not available URL: <http://mail.python.org/pipermail/python-dev/attachments/20160409/96a82690/attachment.sig>
- Previous message (by thread): [Python-Dev] Defining a path protocol
- Next message (by thread): [Python-Dev] Defining a path protocol
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list