PEP 308: A PEP Writer's Experience
Neil Hodgson
nhodgson at bigpond.net.au
Sat Feb 8 17:44:14 EST 2003
More information about the Python-list mailing list
Sat Feb 8 17:44:14 EST 2003
- Previous message (by thread): PEP 308: A PEP Writer's Experience - CON
- Next message (by thread): PEP 308: A PEP Writer's Experience - CON
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
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
- Previous message (by thread): PEP 308: A PEP Writer's Experience - CON
- Next message (by thread): PEP 308: A PEP Writer's Experience - CON
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list