PEP0238 lament

Peter Mayne Peter.Mayne at au1.ibm.com
Tue Jul 24 05:16:36 EDT 2001


"Tim Peters" <tim.one at home.com> wrote in message
news:mailman.995940101.6560.python-list at python.org...
>
> > If you had as many cases of "£"+str(Amount/100)+"."+str(amount%100)
> > and similar in your code as I do - most of which I don't even know who
> > has it or who might have tweaked versions (and I know as an absolute
> > fact those warnings will either not be seen at all or will be ignored)
> > you'd be just as pissed of as I am.
>
> Pissed off at what?  Nothing has changed.  It's possible nothing will.
It's
> certain nothing will for half a year at earliest.  It's being discussed --
> or at least *was*, for a little while.

Assume that there's a problem with the operation currently represented by
the token "/". An undetermined (by me, certainly) fraction of the
Python-using population think that there isn't, but just for sake of
discussion here, assume there is.

The proposed solution (stop me if I'm wrong) involves modifying the
behaviour of "/".

There is obviously an installed base of code that relies on the current
behaviour of "/", such as the code above.

As someone who has had occasion in the past to fix and/or upgrade customer
code that has been working for years, until one day it didn't, can you
please discuss why it is seen as acceptable to break existing code like
this, rather than (for instance) simply introducing a new token (such as
"//") to do the "right" thing?

Note that in at least one instance that I can think of, I had to learn the
language on the spot (COBOL, if you're interested) to get things going. In
three years' time, if I had to learn Python on the spot under similar
circumstances, and I read the up-to-date documentation explaining the
(unbeknownst to me) "new" behaviour of "/", I could see myself in deep
water. Obviously the person who wrote the code knew what they were doing
when they used "/" at the time, and I would be *very* wary of the quick fix
of changing it to "//" because it seemed to work.

I am utterly mystified that such a thing should even be considered.

Clear discussion welcome.

PJDM
--
Peter Mayne
IBM GSA (but the opinions are mine)
Canberra, ACT, Australia
This post is covered by Sturgeon's Law.





More information about the Python-list mailing list