Should `urllib.parse.urljoin` accept multiple parts?

Should urllib.parse.urljoin accept multiple parts for joining?
Doing so would be more consistent with other path joining functions.

function signature
urllib.parse.urljoin def urljoin(base, url, allow_fragments=True)
proposal def urljoin(base, url, *urls, allow_fragments=True)
pathlib.PurePath.joinpath def joinpath(self, *pathsegments)
posixpath.join def join(a, *p)
ntpath.join def join(path, *paths)

The proposed new signature could preserve compatibility with current usage if implemented to do so.

1 Like