[Python-Dev] Proposal to revert r54204 (splitext change)

Patrick Maupin pmaupin at gmail.com
Sat Mar 17 06:48:48 CET 2007


On 3/16/07, Steve Holden <steve at holdenweb.com> wrote:
> Perhaps you'd like to remind me that "backward compatibilty" includes
> the necessity to run new programs on old versions of Python, too?

Ahh, but you see, new programs are the easy part.  You actually have
at least four choices of different levels of backward compatibility:

1) If you are absolutely sure that the code in your program will never
be used to work with filenames with leading dots, you are already
finished!  (Note that this goal is much easier to achieve if you don't
release the source, or at least write it so badly that nobody will
want to reuse the code.)

2) If you think that most users of your program won't use filenames
with leading dots, and you don't plan on supporting it after a year or
so, just make sure it works with 2.5.

3) Conversely, if you're not that bothered about leading dots, and
don't think you'll have all the bugs out of your program for a year or
so anyway, just wait for 2.6. (All the "cool" potential users of your
program will be on the bleeding edge, anyway.)

4) Finally, if you're one of those Luddite sticklers who wants to try
to ruin everybody's job security by writing code that works right now
and doesn't need to be touched later, just write your own version of
this function.  I would have suggested that you could reuse the
underlying functionality in conjunction with a version check, but it
has been pointed out that the existence of tests and docstrings which
perfectly match the code is no impediment to change, so Philip might
get mad enough to change it back for 3.1, and then your version check
would be obsolete.

> Then I can stop wasting everyone's time. Even though I am no fonder of
> code breakage than I was.

Fortunately, for new code (at least for this particular change!), you
don't have to worry about breakage.  I'm sure this discussion has been
so indelibly etched into your brain that you won't forget to check
your filename management functions very carefully.

Sorry, were you being sarcastic?  I didn't realize that.  Or am I
prevaricating again?

Regards,
Pat


More information about the Python-Dev mailing list