Commit d7a064e7 authored by R David Murray's avatar R David Murray

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.
parents 3780fde9 5e743b0d
...@@ -71,7 +71,8 @@ def isabs(s): ...@@ -71,7 +71,8 @@ def isabs(s):
def join(a, *p): def join(a, *p):
"""Join two or more pathname components, inserting '/' as needed. """Join two or more pathname components, inserting '/' as needed.
If any component is an absolute path, all previous path components 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) sep = _get_sep(a)
path = a path = a
try: try:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment