[Python-Dev] Re: os.path.commonprefix breakage

Tim Peters tim_one@email.msn.com
Thu, 17 Aug 2000 19:29:16 -0400


[Skip, as quoted by MarkH]
> I don't realize that because a bug wasn't noticed for a long
> time was any reason not to fix it.  Guido was also involved in the
> repair of the bug, and

[MarkH]
> I think most people agreed that the new semantics were preferable to the
> old.  I believe Tim was just having a dig at the fact the  documentation
> was not changed, and also wearing his grumpy-conservative hat (well, it is
> election fever in the US!)

Not at all, I meant it.  When the code and the docs have matched for more
than 6 years, there is no bug by any rational definition of the term, and
you can be certain that changing the library semantics then will break
existing code.  Presuming to change it anyway is developer arrogance of the
worst kind, no matter how many developers cheer it on.  The docs are a
contract, and if they were telling the truth, we have a responsibility to
stand by them -- and whether we like it or not (granted, I am overly
sensitive to contractual matters these days <0.3 wink>).

The principled solution is to put the new functionality in a new function.
Then nobody's code breaks, no user feels abused, and everyone gets what they
want.  If you despise what the old function did, that's fine too, deprecate
it -- but don't screw people who were using it happily for what it was
documented to do.

> But remember - the original question was if the new semantics
> should return the trailing "\\" as part of the common prefix, due
> to the demonstrated fact that at least _some_ code out there
> depends on it.
>
> Tim wanted a bug filed, but a few other people have chimed in saying
> nothing needs fixing.
>
> So what is it?  Do I file the bug as Tim requested?   Maybe I should just
> do it, and assign the bug to Guido - at least that way he can make a quick
> decision?

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

hell-stick-in-fifty-new-functions-if-that's-what-it-takes-but-leave-
    the-old-one-alone-ly y'rs  - tim