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

@ -2379,8 +2379,8 @@ class Path:
def __repr__(self):
return self.__repr.format(self=self)
def joinpath(self, add):
next = posixpath.join(self.at, add)
def joinpath(self, *other):
next = posixpath.join(self.at, *other)
return self._next(self.root.resolve_dir(next))
__truediv__ = joinpath