PEP0238 lament
Tim Peters
tim.one at home.com
Sun Jul 22 18:02:31 EDT 2001
[Martijn Faassen]
> ...
> The audience was entirely self-selected;
Unlike, say, the participants in this discussion? Hmm. You set a rather
high standard here, Martijn <wink>.
? they were people with an interest in numeric models.
Or uninterested in Stackless (its "competition" in that time slot). I
suppose the next time we want advice about Unicode, we should just ask
Americans.
> Did Guido ask for a show of hands in the big session afterwards?
No, not on this issue.
> I don't recall; I kind of suspect the outcome would've been different.
I actually think 1/2==0 bothers "the general" population more than those
with a keen interest in numerics. Indeed, nobody with a keen interest in
numerics has bugged Guido about this except Moshe, that I know of; the most
visible repeated pressures have come from educators using Python as a means
to some other end.
>> The current integer division loses information silently and without a
>> trace combined with that Python is not a statically typed language,
>> there's simply no telling what e.g.
>>
>> def velocity(distance, time):
>> return distance / time
>>
>> will compute by inspection.
> There's no telling what:
>
> def add_stuff(a, b):
> return a + b
>
> will compute by inspection either, though.
You chopped all my following text, saying that the velocity() example wasn't
about user-defined overloadings but about ordinary arithmetic on the builtin
numeric types. A user trying e.g. velocity(3, 2) is simply going to be
surprised -- as countless newbies have testified on c.l.py over the years.
> ...
> For working with pixels in GUIs and such, integer division can be a
> useful thing, though.
It can be useful for many things; that's not at issue, and nobody has ever
proposed taking away the ability to get an integer result; the issue is how
to spell that.
More information about the Python-list
mailing list