diff options
author | Jason R. Coombs <jaraco@jaraco.com> | 2020-12-16 02:12:54 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-12-16 02:12:54 (GMT) |
commit | 928dbfc16c9c4715459c80fe551c74702480db8b (patch) | |
tree | 1da038399be37bf24e597725c179a329697d88be /Doc/library/zipfile.rst | |
parent | b230409f21f5e5b42de6ec10147cd95ae3bdd095 (diff) | |
download | cpython-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.rst | 15 |
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: |