For review: PEP 308 - If-then-else expression
Michele Simionato
mis6 at pitt.edu
Sat Feb 8 18:19:40 EST 2003
Piet van Oostrum <piet at cs.uu.nl> wrote in message news:<wzvfzud7rk.fsf at nono.cs.uu.nl>...
> If we take '->' instead of 'then' then we don't need a new keyword. The
> combination '->' is illegal in current Python.
>
> So the construction would be:
> if <condition> -> <expression1> else <expression2>
>
Interesting. I would accept this or the "when" proposal. But I am not
sure if other Pythonistas would like a new special symbol "->" only used in the
ternary operator. Maybe you should think of other case of use for "->".
Michele
More information about the Python-list
mailing list