> As long as you wait until April 1 (that's an odd day). :-) > I'm an even-day fan of trinary operators myself, but > this opens too many questions. For example, with > regard to short-circuiting, it will be inconsistent > with other expressions at some level in either form > or function. How so? If we give 'or' (and hence 'and') a higher priority -- i.e. binding tighter -- than 'if' and 'else', it's unambiguous to the parser and also consistent with the if statement: if x and y: print 1 else print 0 means the same as print 1 if x and y else 0 This is also similar to how lambda groups relative to and/or (and/or has a higher priority). I'm not sure yet how lambda and if/else should group relative to each other. --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