For review: PEP 308 - If-then-else expression
Paul Rubin
phr-n2003b at NOSPAMnightsong.com
Sun Feb 9 15:42:46 EST 2003
Alex Martelli <aleax at aleax.it> writes:
> Me, I'd ALSO like it to be general enough to pick 1-of-N cases,
> not just 1-of-2. But somebody else included the further hard
> constraint that in the 1-of-2 cases, the "when true" value
> MUST come before the "when false" one, and that makes the only
> proposal I liked,
> selector->(when0, when1, when2)
> unacceptable. Pity:-(.
How about changing the selection operator instead of the paren type:
selector -> (when0, when1, when2)
selector => (whentrue, whenfalse)
More information about the Python-list
mailing list