summaryrefslogtreecommitdiffstats
path: root/Doc/library/pathlib.rst
diff options
context:
space:
mode:
authorJoshua Cannon <joshua.cannon@ni.com>2020-11-20 15:40:39 (GMT)
committerGitHub <noreply@github.com>2020-11-20 15:40:39 (GMT)
commit452058448335b39c784af9a047f9c4a1767c0b00 (patch)
tree689ce4a242fa55ae5ff479fa936596d04d92f3dd /Doc/library/pathlib.rst
parentd20b7ed9c1fabac3fdebb7ec362fe4f022a54639 (diff)
downloadcpython-452058448335b39c784af9a047f9c4a1767c0b00.zip
cpython-452058448335b39c784af9a047f9c4a1767c0b00.tar.gz
cpython-452058448335b39c784af9a047f9c4a1767c0b00.tar.bz2
bpo-35498: Added slice support to PathLib parents attribute. (GH-11165)
Added slice support to the `pathlib.Path.parents` sequence. For a `Path` `p`, slices of `p.parents` should return the same thing as slices of `tuple(p.parents)`.
Diffstat (limited to 'Doc/library/pathlib.rst')
-rw-r--r--Doc/library/pathlib.rst2
1 files changed, 2 insertions, 0 deletions
diff --git a/Doc/library/pathlib.rst b/Doc/library/pathlib.rst
index 9de72bb..2071e7e 100644
--- a/Doc/library/pathlib.rst
+++ b/Doc/library/pathlib.rst
@@ -336,6 +336,8 @@ Pure paths provide the following methods and properties:
>>> p.parents[2]
PureWindowsPath('c:/')
+ .. versionchanged:: 3.10
+ Slice support was added.
.. data:: PurePath.parent