For review: PEP 308 - If-then-else expression

Michele Simionato mis6 at
Sun Feb 9 00:19:40 CET 2003

Piet van Oostrum <piet at> wrote in message news:<wzvfzud7rk.fsf at>...

> 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 mailing list