Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(2301)

#4755: Common path prefix

Can't Edit
Can't Publish+Mail
Start Review
Created:
10 years, 3 months ago by skip.montanaro
Modified:
6 years, 10 months ago
Reviewers:
techtonik
CC:
loewis, Skip, Nick Coghlan, techtonik, hall.jeff_gmail.com, eric.araujo, python_craig.mcqueen.id.au, Martin Panter, storchaka
Visibility:
Public.

Patch Set 1 #

Total comments: 2
Unified diffs Side-by-side diffs Delta from patch set Stats Patch
Doc/library/os.path.rst View 1 chunk +10 lines, -0 lines 2 comments Download
Lib/genericpath.py View 2 chunks +21 lines, -1 line 0 comments Download
Lib/macpath.py View 2 chunks +9 lines, -1 line 0 comments Download
Lib/ntpath.py View 1 chunk +20 lines, -0 lines 0 comments Download
Lib/os2emxpath.py View 1 chunk +1 line, -1 line 0 comments Download
Lib/test/test_genericpath.py View 1 chunk +49 lines, -0 lines 0 comments Download
Lib/test/test_macpath.py View 1 chunk +31 lines, -0 lines 0 comments Download
Lib/test/test_ntpath.py View 1 chunk +34 lines, -0 lines 0 comments Download
Lib/test/test_posixpath.py View 1 chunk +35 lines, -0 lines 0 comments Download

Messages

Total messages: 1
techtonik
6 years, 10 months ago #1
I'd only rename it to commonpath() and deprecate commonprefix() as the latter is
trivial to implement and basically useless.

http://bugs.python.org/review/4755/diff/694/1291
File Doc/library/os.path.rst (right):

http://bugs.python.org/review/4755/diff/694/1291#newcode56
Doc/library/os.path.rst:56: .. function:: commonpathprefix(list, separator=None)
.. function:: commonpath(list, separator=os.sep)

http://bugs.python.org/review/4755/diff/694/1291#newcode63
Doc/library/os.path.rst:63: defaults to either os.sep or os.altsep.
Return the longest common path for all paths in *list*. If *list* is empty,
return the empty string (``''``). The path does not necessarily exist.
Sign in to reply to this message.

RSS Feeds Recent Issues | This issue
This is Rietveld 894c83f36cb7+