> > > It's a new keyword though, which has a much > > > higher threshold for acceptance than a new two-character operator > > > symbol. > > > It could be non-reserved, since a div b is currently > > a syntax error. > > Except for the fact our current parser can't handle the 'a div b' syntax > without making 'div' a reserved word, which also makes 'x.div', 'class div:' > and 'def div():' invalid syntax. It might be work around-able, but .... :P No, we *could* use the 'import as' trick: define the syntax as term: factor (('*'|'/'|'%'|NAME) factor)* and add a check that NAME is "div" in the compiler. But I don't know how comfy I am with a proliferation of hacks like this -- and it's likely to cause more confusing error messages. --Guido van Rossum (home page: http://www.python.org/~guido/)
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