[Python-Dev] Re: os.path.commonprefix breakage (original) (raw)

Greg Ewing greg@cosc.canterbury.ac.nz
Fri, 18 Aug 2000 14:45:46 +1200 (NZST)


Tim Peters:

The principled solution is to put the new functionality in a new function.

I agree with that.

By my count, Unix and Windows people have each voted for both answers, and the Mac contingent is silently laughing .

The Mac situation is somewhat complicated. Most of the time a single trailing colon makes no difference, but occasionally it does. For example, "abc" is a relative pathname, but "abc:" is an absolute pathname!

The best way to resolve this, I think, is to decree that it should do the same as what os.path.split does, on all platforms. That function seems to know how to deal with all the tricky cases correctly.

Don't-even-think-of-asking-about-VMS-ly,

Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | greg@cosc.canterbury.ac.nz +--------------------------------------+