summaryrefslogtreecommitdiffstats
path: root/Doc/library/os.rst
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2016-01-06 19:36:03 (GMT)
committerGuido van Rossum <guido@python.org>2016-01-06 19:36:03 (GMT)
commit1469d744bccbf7c6357bd23f06851d70f538f7e6 (patch)
treed662c99f9e2770326add9a8456650b6ba8a41e9c /Doc/library/os.rst
parent05075203c5577120b6f49b377d04cc0de8ef5bf2 (diff)
downloadcpython-1469d744bccbf7c6357bd23f06851d70f538f7e6.zip
cpython-1469d744bccbf7c6357bd23f06851d70f538f7e6.tar.gz
cpython-1469d744bccbf7c6357bd23f06851d70f538f7e6.tar.bz2
Cross-reference os.DirEntry and pathlib.Path for issue #22570.
Diffstat (limited to 'Doc/library/os.rst')
-rw-r--r--Doc/library/os.rst6
1 files changed, 6 insertions, 0 deletions
diff --git a/Doc/library/os.rst b/Doc/library/os.rst
index 144d9b2..dcdc4ec 100644
--- a/Doc/library/os.rst
+++ b/Doc/library/os.rst
@@ -2035,6 +2035,12 @@ features:
The result is cached on the ``DirEntry`` object. Call :func:`os.stat`
to fetch up-to-date information.
+ Note that there is a nice correspondence between several attributes
+ and methods of ``DirEntry`` and of :class:`pathlib.Path`. In
+ particular, the ``name`` and ``path`` attributes have the same
+ meaning, as do the ``is_dir()``, ``is_file()``, ``is_symlink()``
+ and ``stat()`` methods.
+
.. versionadded:: 3.5