How about adding rational fraction to Python?

Paul Rubin http
Tue Feb 26 16:24:33 EST 2008


Ross Ridge <rridge at caffeine.csclub.uwaterloo.ca> writes:
> > The natural result of doing arithmetic with natural numbers is more
> > natural numbers.  
> 
> D'Arcy said nothing about natural numbers, and bringing them up adds
> nothing to this discussion.

The numbers D'Arcy is proposing to operate on that way are natural
numbers whether he says so or not.

Really, the "natural" division operation on integers, if there is one,
is divmod (which returns a quotient and remainder).  The / (now called
//) operator simply throws away the remainder.  



More information about the Python-list mailing list