[Python-checkins] cpython (merge 3.2 -> default): Merge #15342: Add clarifying sentence to posixpath.join docstring.
r.david.murray
python-checkins at python.org
Sat Jul 21 20:38:37 CEST 2012
http://hg.python.org/cpython/rev/30d4d1528b58
changeset: 78224:30d4d1528b58
parent: 78222:cd883160ad97
parent: 78223:61d0e3526a51
user: R David Murray <rdmurray at bitdance.com>
date: Sat Jul 21 14:34:51 2012 -0400
summary:
Merge #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.
files:
Lib/posixpath.py | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
diff --git a/Lib/posixpath.py b/Lib/posixpath.py
--- a/Lib/posixpath.py
+++ b/Lib/posixpath.py
@@ -71,7 +71,8 @@
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:
--
Repository URL: http://hg.python.org/cpython
More information about the Python-checkins
mailing list