[Python-Dev] Defining a path protocol (original) (raw)
Ethan Furman ethan at stoneleaf.us
Thu Apr 7 02:31:27 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 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
- 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 ]