diff options
author | Brett Cannon <brett@python.org> | 2016-06-10 21:37:21 (GMT) |
---|---|---|
committer | Brett Cannon <brett@python.org> | 2016-06-10 21:37:21 (GMT) |
commit | 96881cd6218000380d4a6ce60ff47bb6d785e524 (patch) | |
tree | 2e60afb93e6419a6d8d3a84d701c27d7364eaaeb /Doc/library/os.rst | |
parent | 419e8ede1954461f45ee93629d6252d81919cbfe (diff) | |
download | cpython-96881cd6218000380d4a6ce60ff47bb6d785e524.zip cpython-96881cd6218000380d4a6ce60ff47bb6d785e524.tar.gz cpython-96881cd6218000380d4a6ce60ff47bb6d785e524.tar.bz2 |
Issue #27186: Add os.PathLike support to DirEntry
Initial patch thanks to Jelle Zijlstra.
Diffstat (limited to 'Doc/library/os.rst')
-rw-r--r-- | Doc/library/os.rst | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/Doc/library/os.rst b/Doc/library/os.rst index 46d49df..18b539b 100644 --- a/Doc/library/os.rst +++ b/Doc/library/os.rst @@ -1994,6 +1994,9 @@ features: control over errors, you can catch :exc:`OSError` when calling one of the ``DirEntry`` methods and handle as appropriate. + To be directly usable as a path-like object, ``DirEntry`` implements the + :class:`os.PathLike` interface. + Attributes and methods on a ``DirEntry`` instance are as follows: .. attribute:: name @@ -2106,6 +2109,9 @@ features: .. versionadded:: 3.5 + .. versionchanged:: 3.6 + Added support for the :class:`os.PathLike` interface. + .. function:: stat(path, \*, dir_fd=None, follow_symlinks=True) |