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 . 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).