summaryrefslogtreecommitdiff
path: root/Lib/posixpath.py
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2012-07-21 14:33:56 -0400
committerR David Murray <rdmurray@bitdance.com>2012-07-21 14:33:56 -0400
commitb95d04266ffa4273910e3f64570eaad7e2784b44 (patch)
treec570a65ec4edace19d0b6ca121f2670a129f6c72 /Lib/posixpath.py
parent7bf7913a39eb3ced31b52e0b6ad0874867d469d8 (diff)
downloadcpython-b95d04266ffa4273910e3f64570eaad7e2784b44.tar.gz
#15342: Add clarifying sentence to posixpath.join docstring.
This sentence appears as a clarifying note in the HTML docs, and seems worth having in the docstring since it covers a very common use case that isn't otherwise obvious. Thanks to Yongzhi Pan for the suggestion.
Diffstat (limited to 'Lib/posixpath.py')
-rw-r--r--Lib/posixpath.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/Lib/posixpath.py b/Lib/posixpath.py
index 7a4daa8be9..2e3625bc6f 100644
--- a/Lib/posixpath.py
+++ b/Lib/posixpath.py
@@ -71,7 +71,8 @@ def isabs(s):
def join(a, *p):
"""Join two or more pathname components, inserting '/' as needed.
If any component is an absolute path, all previous path components
- will be discarded."""
+ will be discarded. An empty last part will result in a path that
+ ends with a separator."""
sep = _get_sep(a)
path = a
try: