[Python-Dev] Re: PEP239 (Rational Numbers) Reference Implementation and new issues
Greg Ewing
greg@cosc.canterbury.ac.nz
Thu, 03 Oct 2002 12:42:56 +1200 (NZST)
Guido:
> The right conversions should happen when you mix rationals with other
> types of numbers (int/long -> rational -> float -> complex), but no
> operations should return rationals unless a rational goes in.
Maybe there should be a separate operator for rational
division?
1/3 --> float
1//3 --> int
1///3 --> rational
(Okay, a 3-char operator is a bit verbose, but I can't
think of anything else that looks division-like just at
the moment.)
Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury, | A citizen of NewZealandCorp, a |
Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. |
greg@cosc.canterbury.ac.nz +--------------------------------------+