summaryrefslogtreecommitdiffstats
path: root/Doc/library/zipfile.rst
diff options
context:
space:
mode:
authorJason R. Coombs <jaraco@jaraco.com>2020-12-16 02:12:54 (GMT)
committerGitHub <noreply@github.com>2020-12-16 02:12:54 (GMT)
commit928dbfc16c9c4715459c80fe551c74702480db8b (patch)
tree1da038399be37bf24e597725c179a329697d88be /Doc/library/zipfile.rst
parentb230409f21f5e5b42de6ec10147cd95ae3bdd095 (diff)
downloadcpython-928dbfc16c9c4715459c80fe551c74702480db8b.zip
cpython-928dbfc16c9c4715459c80fe551c74702480db8b.tar.gz
cpython-928dbfc16c9c4715459c80fe551c74702480db8b.tar.bz2
bpo-42090: zipfile.Path.joinpath now accepts multiple arguments (GH-22976)
Automerge-Triggered-By: GH:jaraco
Diffstat (limited to 'Doc/library/zipfile.rst')
-rw-r--r--Doc/library/zipfile.rst15
1 files changed, 14 insertions, 1 deletions
diff --git a/Doc/library/zipfile.rst b/Doc/library/zipfile.rst
index 7126d8b..3db55e6 100644
--- a/Doc/library/zipfile.rst
+++ b/Doc/library/zipfile.rst
@@ -483,7 +483,7 @@ Path Objects
Path objects expose the following features of :mod:`pathlib.Path`
objects:
-Path objects are traversable using the ``/`` operator.
+Path objects are traversable using the ``/`` operator or ``joinpath``.
.. attribute:: Path.name
@@ -532,6 +532,19 @@ Path objects are traversable using the ``/`` operator.
Read the current file as bytes.
+.. method:: Path.joinpath(*other)
+
+ Return a new Path object with each of the *other* arguments
+ joined. The following are equivalent::
+
+ >>> Path(...).joinpath('child').joinpath('grandchild')
+ >>> Path(...).joinpath('child', 'grandchild')
+ >>> Path(...) / 'child' / 'grandchild'
+
+ .. versionchanged:: 3.10
+ Prior to 3.10, ``joinpath`` was undocumented and accepted
+ exactly one parameter.
+
.. _pyzipfile-objects: