For review: PEP 308 - If-then-else expression
mis6 at pitt.edu
Sun Feb 9 00:19:40 CET 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 "->".
More information about the Python-list