summaryrefslogtreecommitdiff
path: root/Lib/posixpath.py
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2012-07-21 14:37:29 -0400
committerR David Murray <rdmurray@bitdance.com>2012-07-21 14:37:29 -0400
commitac9b5c67d35ee100ff1d80f4d55c307aab4ca4e7 (patch)
treeb8fa752bed441af3da0748522d3cd66aa19a7e48 /Lib/posixpath.py
parentd33a9beb8d9de33b86d305ed4733b3e5acacd37e (diff)
downloadcpython-git-ac9b5c67d35ee100ff1d80f4d55c307aab4ca4e7.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 690c70da37..5ddf25b106 100644
--- a/Lib/posixpath.py
+++ b/Lib/posixpath.py
@@ -68,7 +68,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."""
path = a
for b in p:
if b.startswith('/'):