> This can be solved by simply choosing a different name: > iif(cond, expr, expr) > when(cond, expr, expr) > cond(cond, expr, expr) > check(cond, expr, expr) > ... -1 too. (1) In order to do short-circuiting evaluation, the name would have to be recognized by the parser, which means it would have to be a new keyword. None of these keywords sound attractive. (2) It looks too much like a function call for my comfort. I still like (if cond then expr else expr) better than any of these. --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