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

Tim Peters tim.one at home.com
Mon Jul 23 22:51:03 EDT 2001


[Skip Montanaro]
> ...
> I really don't understand the problem with teaching people new to
> Python right from the get-go that when you divide two ints it works
> like grade school long division.

I'm burned out on the repetition here.  It's not a question of being hard to
teach.  It's largely that it's never sensible for

    x = y / z

buried in the middle of some routine to do truncating division if y and z
happen to be ints but best-possible division if they happen not to be ints.
It's this damage to polymorphism that hurts people in real life, and we've
had years of testimony about that on c.l.py (even in this incarnation of the
debate, although it's hard to find unless you read every msg).

This isn't a question of teaching the rules, it's that the specific rule
here is essentially braindead in a language without static type
declarations.  If you read nothing else, read Guido's few messages on the
topic.  He covers it all succinctly and accurately (and generally declines
to get sucked into endless repetition -- but why a point needs to be made
500 times on Usenet is beyond me).

> ...
> You're pissing off a fairly significant fraction of the language's
> existing constituency in hopes of attracting some non-programmers
> to the language who may not come anyway for various other reasons.

I don't detect any trace of that hypothesized motive in Guido.  He wants to
repair what he has come to believe is a serious design error, and is
wrestling with ways to get that done.  What a remarkably different world it
would be if people tried to help <wink>.





More information about the Python-list mailing list