Add docstring for `join` in ntpath.py

Adapted from the corresponding docstring in posixpath.py
This commit is contained in:
Ed Schofield 2020-02-19 14:37:49 +11:00
parent a4ba8a3983
commit d7d78edbb5
1 changed files with 4 additions and 0 deletions

View File

@ -75,6 +75,10 @@ def isabs(s):
# Join two (or more) paths.
def join(path, *paths):
"""Join two or more pathname components, inserting '\\' as needed.
If any component is an absolute path, all previous path components
will be discarded. An empty last part will result in a path that
ends with a separator."""
path = os.fspath(path)
if isinstance(path, bytes):
sep = b'\\'