Ethan Furman added the comment:

The expected scenario, and the purpose of os.fspath(), is to enable high-level 
libraries to not know or care if they receive a pathlib object or a string.

In other words, they already have os.path.join() and os.path.split() calls, and 
currently break noisily if a pathlib.Path is passed in; by enhancing os.path to 
accept a pathlib.Path object that high-level library can start working with 
pathlib.Path objects without changing a thing, which means the user of that 
library can use pathlib.Path painlessly.

Unless I have seriously misunderstood something, os.path will be changed to 
work with __fspath__ objects.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue27184>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to