[issue22570] Better stdlib support for Path objects

Guido van Rossum report at bugs.python.org
Wed Jan 6 16:59:22 EST 2016


Guido van Rossum added the comment:

Let's say that the path attribute should be str or bytes -- this matches
the behavior of DirEntry. (But for pathlib.Path it is always a str.) It
cannot be None or FD. But note that the getattr(x, 'path', x) idiom returns
x unchanged if x is None or an FD (or a stream, for that matter).

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue22570>
_______________________________________


More information about the Python-bugs-list mailing list