PEP 308: A PEP Writer's Experience - CON
Neil Hodgson
nhodgson at bigpond.net.au
Sat Feb 8 17:44:14 EST 2003
Michael Chermside:
> [3c] if condition then val1 else val2
The "if" appears unnecessary to me.
condition then val1 else val2
appears unambiguous and doesn't reuse "if". So
text += isPythonic() then "+1" else twice("minus-ungood")
I haven't reachd +1 on a conditional operator yet but feel it should
either use keywords for all parts (as in the PEP or as above) or punctuation
for all parts like "C ? tV ! fV" or similar. I also prefer maintaining the
if-else ordering (condition, trueValue, falseValue) as that is more familiar
from the Python "if" statement and the C++ ternary operator.
Neil
More information about the Python-list
mailing list