Terry Reedy wrote: > Many people, perhaps most, including me, read > > exp1 if exp2 else exp3 # as > cond if etrue else efalse # in direct analogy with > cond ? etrue : efalse # from C I'd have thought only Forth programmers would be prone to that! It would surprise me greatly if it's really true that *most* people would read it that way. Especially given that, in real code, you're not going to be looking at abstract names like exp1, exp2, exp3, but (hopefully) something a lot more meaningful. Can you honestly say that you would read return red_value if color == 'red' else blue_value as if red_value: return color == 'red' else: return blue_value ? -- Greg Ewing, Computer Science Dept, +--------------------------------------+ University of Canterbury, | A citizen of NewZealandCorp, a | Christchurch, New Zealand | wholly-owned subsidiary of USA Inc. | greg.ewing at canterbury.ac.nz +--------------------------------------+
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