On 8/20/20 6:06 PM, Christopher Barker wrote:

But for a while is was painful to use, 'cause there was som much code that still used strings for paths. That was made a lot better when we introduced the __fspath__ protocol, and then updated the standard library to use it (everywhere?).

Unfortunately not [1]. The __fspath__ protocol is supported in locations where a path is expected as an argument (e.g. os.path.join()); anywhere else it is not supported except by accident (meaning it could easily become actually unsupported in the future).

--
~Ethan~


[1] https://bugs.python.org/issue39461
_______________________________________________
Python-ideas mailing list -- python-ideas@python.org
To unsubscribe send an email to python-ideas-le...@python.org
https://mail.python.org/mailman3/lists/python-ideas.python.org/
Message archived at 
https://mail.python.org/archives/list/python-ideas@python.org/message/C2N4UZWM7LJCGX46GE2SOJ7OF6TAODSD/
Code of Conduct: http://python.org/psf/codeofconduct/

Reply via email to