From: R David Murray Date: Sat, 21 Jul 2012 18:33:56 +0000 (-0400) Subject: #15342: Add clarifying sentence to posixpath.join docstring. X-Git-Tag: v3.3.0b2~133^2 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=e3de175a5e280a01fda003a825bab7bdfedf445b;p=python #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. --- 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: