Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e3de175

Browse files
committed
#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.
1 parent ef391ac commit e3de175

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

Lib/posixpath.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -71,7 +71,8 @@ def isabs(s):
7171
def join(a, *p):
7272
"""Join two or more pathname components, inserting '/' as needed.
7373
If any component is an absolute path, all previous path components
74-
will be discarded."""
74+
will be discarded. An empty last part will result in a path that
75+
ends with a separator."""
7576
sep = _get_sep(a)
7677
path = a
7778
try:

0 commit comments

Comments
 (0)