[Python-Dev] Re: PEP239 (Rational Numbers) Reference Implementation and new issues

Guido van Rossum guido@python.org
Mon, 07 Oct 2002 21:37:58 -0400


> I liked 2r/3 because it gives the sense that r/ is the rational
> division operator, where // is the whatever-the-hell-it-is division
> operator. I don't know if it works in the grammar to be able to say
>   
>   x r/ y
> 
> though. Does it?

That would require changes to the tokenizer.

But I am against r/ on different grounds: it's not the kind of
grouping of symbols that one would expect.  People are used to 12L, 1j
and then it's a small step to 2r.  There were also precedents for
r"..." and u"...": C's w"...".  If you want a precedent for 2/, you'd
have to search in Lisp or Forth or other (nearly) grammar-less
languages.

--Guido van Rossum (home page: http://www.python.org/~guido/)