bpo-42090: zipfile.Path.joinpath now accepts multiple arguments (GH-22976)

Automerge-Triggered-By: GH:jaraco
This commit is contained in:
Jason R. Coombs 2020-12-15 21:12:54 -05:00 committed by GitHub
parent b230409f21
commit 928dbfc16c
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
4 changed files with 24 additions and 3 deletions

View file

@ -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: