A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://mail.python.org/pipermail/python-dev/2000-July/005897.html below:

[Python-Dev] patch for os.path.commonprefix (changes semantics

[Python-Dev] patch for os.path.commonprefix (changes semantics - pls review) [Python-Dev] patch for os.path.commonprefix (changes semantics - pls review)Skip Montanaro skip@mojam.com (Skip Montanaro)
Sun, 9 Jul 2000 11:03:00 -0500 (CDT)
os.path.commonprefix seems broken to me.  If you ask it to return the common
prefix of "/home/swen/spam" and "/home/swan/eggs", it returns "/home/sw".
Since we are talking file paths, not strings, I think the common prefix
should be "/home".  Since my patch changes the semantics of the function, I
submitted a patch via SF that implements what I believe to be the correct
behavior instead of just checking in the change, so people could comment on
it.  Also, since the version in ntpath.py was the same as the version in
posixpath.py I modified both, replacing "/" with os.sep (is that correct?).
Note that I can't check that it returns something useful on NT, though I
suspect it will.  There is no commonprefix function in macpath.py.  Is this
a function that would have no meaning on the Mac?

The patch is available for review at

    http://sourceforge.net/patch/?func=detailpatch&patch_id=100788&group_id=5470

Skip




RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4