[Edu-sig] Re: rationals

Christopher A. Craig list-python@ccraig.org
11 Oct 2002 14:10:41 -0400


"Kirby Urner" <urnerk@qwest.net> writes:

> (I like the r as the final symbol in the number name, as L used to
> be for longs).
> 
> Kirby

It's my understanding that that is exactly what Guido is proposing.
He is, I believe, proposing that the regular expression ([0-9]*)r
define a rational number with the integral value of the parenthesized
group.  So, much like present CPython where -3 actually defines the
integer three and then negates it and 1+2j defines the integer 1 and
the complex (0+2j) and adds them, 3/2r would define the integer 3 and
the rational (2/1)r and then divide them to get (3/2)r (This could, of
course, be optimized to a real definition by a different/future
compiler).

-- 
Christopher A. Craig <list-python@ccraig.org>
"It's the one thing I understand, I guess." Bill Gates, about BASIC