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

Guido van Rossum guido at python.org
Wed Jul 25 00:31:00 EDT 2001


paul at boddie.net (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 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.

(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.)

--Guido van Rossum (home page: http://www.python.org/~guido/)



More information about the Python-list mailing list