diff options
author | Guido van Rossum <guido@python.org> | 2016-05-19 20:10:20 (GMT) |
---|---|---|
committer | Guido van Rossum <guido@python.org> | 2016-05-19 20:10:20 (GMT) |
commit | 387e6e38175b853741c4f35e08791f0990bc0845 (patch) | |
tree | d869c7273239c3991c3e5a54ae6966462260ac3c /Doc/library | |
parent | d8bf09c6cd1137b148a06a0283c060e3e1e6cc46 (diff) | |
parent | 3d4d01f614d894327bbdc1feadebd50b2d3621ff (diff) | |
download | cpython-387e6e38175b853741c4f35e08791f0990bc0845.zip cpython-387e6e38175b853741c4f35e08791f0990bc0845.tar.gz cpython-387e6e38175b853741c4f35e08791f0990bc0845.tar.bz2 |
Back out pathlib.Path.path attr. (Merge 3.4->3.5)
Diffstat (limited to 'Doc/library')
-rw-r--r-- | Doc/library/pathlib.rst | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/Doc/library/pathlib.rst b/Doc/library/pathlib.rst index a7ce18d..2f06544 100644 --- a/Doc/library/pathlib.rst +++ b/Doc/library/pathlib.rst @@ -365,28 +365,6 @@ Pure paths provide the following methods and properties: '' -.. data:: PurePath.path - - A string representing the full path:: - - >>> PurePosixPath('my/library/setup.py').path - 'my/library/setup.py' - - This always returns the same value as ``str(p)``; it is included to - serve as a one-off protocol. Code that wants to support both - strings and ``pathlib.Path`` objects as filenames can write - ``arg = getattr(arg, 'path', arg)`` to get the path as a string. - This can then be passed to various system calls or library - functions that expect a string. Unlike the alternative - ``arg = str(arg)``, this will still raise an exception if an object - of some other type is given by accident. - - A nice advantage is that this protocol is also supported by - :class:`os.DirEntry` objects returned by :func:`os.scandir`. - - .. versionadded:: 3.4.5 - .. versionadded:: 3.5.2 - .. data:: PurePath.suffix The file extension of the final component, if any:: |