Guido van Rossum <guido@python.org> writes: > > 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. You're right. And now that I look at it, if 2r is a rational with value 2, and if you can divide ints by rationals, then 1/2r makes a lot of sense. I wasn't looking at it that way (but I am now, and liking it). > 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. Oh, please, don't remind me about those funky Forth symbols. I guess it has less to do with grammar than with lexemes, though. -- David Abrahams * Boost Consulting dave@boost-consulting.com * http://www.boost-consulting.com
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4