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/2008-December/084629.html below:

[Python-Dev] A wart which should have been repaired in 3.0?

[Python-Dev] A wart which should have been repaired in 3.0? [Python-Dev] A wart which should have been repaired in 3.0?skip at pobox.com skip at pobox.com
Mon Dec 29 00:14:00 CET 2008
>>>>> "skip" == skip  <skip at pobox.com> writes:

    Martin> I don't think any change is necessary. os.path.commonprefix
    Martin> works just fine on path components:

    skip> Ummm...

    >>> os.path.commonprefix(["/export/home", "/etc/passwd"])
    '/e'

    skip> I suppose that's correct given the defined behavior of the
    skip> function, but it certainly doesn't seem to be very path-like to
    skip> me.

I should also point out that most people will not have the foresight to use
it the way Martin demonstrated.  Documentation or not, I'll be a fair
fraction of all usage assumes the return value represents a valid path.

    Martin> Of course, using it that way would require a library function
    Martin> that reliably splits a path into components; I think one would
    Martin> have to do abspath on arbitrary inputs.

Kinda what I think os.path.split ought to do.  Should I tackle that next?
;-)

Skip

More information about the Python-Dev mailing list

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