proposed language change to int/int==float (was: PEP0238 lament)

Paul Boddie paul at
Wed Jul 25 11:10:22 CEST 2001

Guido van Rossum <guido at> wrote in message news:<cpd76pbpfh.fsf at>...
> paul at (Paul Boddie) writes:
> > If someone had suggested using // for the int/int->float operation, I
> > bet that hardly anyone would have complained, apart from some people
> > who might consider it "language bloat". But instead, it seems that for
> > the sake of some aesthetic principle the rug is being pulled out from
> > under everyone whether they want to lie down or not.
> It's not just an aesthetic principle.  The currently / behavior is a
> design mistake that needs to be eventually eradicated, because it
> makes writing reliable cood too hard and it makes writing subtly
> broken code too easy.  The only way to do that is to bite the bullet
> -- otherwise Python will still have this problem in 10 years.

I don't disagree with your assertion that it's a bad thing. The
problem is that the / operator has a well-defined meaning in Python
which you're seeking to change. Whether or not it has a desirable
behaviour is almost irrelevant to the strongest argument to leave it
be: that changing its behaviour will potentially break lots of old

I haven't seen any adequate response to the proposal that a different
operator (such as //, although I don't care so much) be used. And in
the PEP, whilst backward compatibility is mentioned, it isn't
addressed in any way which can be considered an acceptable treatment
of the subject.

> I can live with a temporary language wart that we're committed to
> removing.  I don't want to live with the wart forever, which the other
> solution would do.

You have designed a language which I and many others really enjoy
using, and are really grateful for. Whilst programming languages tend
to differ from natural languages by resisting change in order to
promote robust, well-defined semantics, what you are doing here is
analogous to issuing a decree that a particular word in
English/Dutch/French (or your preferred natural language), where the
word isn't exactly an infrequently used noun, now means something

What do you propose we do with all the novels ever written in that
language? Instigate a massive rewriting project? Burn them? Did Monty
Python ever do a sketch about the Cultural Revolution? <1/3 wink>

> (Another argument for PEP 238, which I made in another message, is
> that it opens to way to a unified numeric model, hinted at by PEP
> 228.  I will update both PEPs to greatly improve the motivational
> sections.)

Your numerical aspirations are noble, but due to practical
considerations won't some of us end up speaking "Dutch" and some of us
speaking "Flemish"? ;-)


More information about the Python-list mailing list