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~

_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
https://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
https://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to