[Python-Dev] shouldn't we be considering all pending numeric proposals together?

M.-A. Lemburg mal@lemburg.com
Wed, 25 Jul 2001 19:04:41 +0200

Guido van Rossum wrote:
> ...
> I actually expect that most conversion jobs will be easy -- all those
> folks who suffer from "Extreme Fear of Floating Point" (as Tim calls
> it) can simply change every / into a // in their program (using a tool
> that properly tokenizes) and they should be done, since most likely
> their code never uses floating point. :-)

Well, that would break floating points then... unless float // float
works like float / float does now. Perhaps you should simply 
add a nb_altdivide slot to the numeric set of slots which is then
called for a // b. Floats would then reuse their nb_divide 
for //.

BTW, my idea about rationals turns out not to work too well:
1/6 + 5/6 would give 6/6 == 1 while the current semantics 
return 0 in this case.

Marc-Andre Lemburg
CEO eGenix.com Software GmbH
Company & Consulting:                           http://www.egenix.com/
Python Software:                        http://www.lemburg.com/python/