[Python-Dev] Proposal to revert r54204 (splitext change)
Phillip J. Eby
pje at telecommunity.com
Wed Mar 14 22:39:16 CET 2007
At 08:30 AM 3/15/2007 +1100, Delaney, Timothy (Tim) wrote:
>Phillip J. Eby wrote:
>
> > In addition to being made in the face of controversy and opposition,
> > this
> > change is an alteration to *documented and tested* behavior and thus
> > cannot reasonably be considered a mere bug fix.
>
>FWIW, I support Phillip on this. There can be no question that the old
>behaviour was expected.
>
>IMO this is just gratuitous breakage. The only fix that shold be made is
>to the splitext documentation to match the docstring.
>
>A change to the documented behaviour should require a __future__ import
>for at least one version. That's even assuming that the change is
>desireable (I don't believe so). We have multiple anecdotes of actual,
>existing code that *will* break with this change. So far I haven't seen
>any actual code posted that is currently broken by the existing behaviour.
FWIW, I think that, were we writing splitext() *now*, we should go with the
proposed behavior. It's reasonable and justifiable even on Windows (even
though Windows Explorer agrees with the current splitext() behavior.)
But, that doesn't actually have any bearing on the current discussion,
since splitext()'s behavior is existing and documented.
Certainly, there *is* code that's broken by the existing behavior --
otherwise the patch would never have been submitted in the first
place. However, that doesn't automatically make it a Python bug,
especially if the existing behavior is documented and covered by regression
tests.
I just want to clarify this point, because I don't wish to enter another
round of discussion about the merits of one behavior or the other: the
merits one way or the other are pretty much irrelevant to the policy issue
at hand.
More information about the Python-Dev
mailing list