For review: PEP 308 - If-then-else expression
Laura Creighton
lac at strakt.com
Sat Feb 8 01:22:19 EST 2003
> Skip> Well understood. It's a 90% solution, and for the other 10%
> Skip> where I'd have to resort to something like
>
> Andrew> (<cond> and [expr1] or [expr2])[0]
>
> Skip> I punt and use an if statement.
>
> The contexts in which I would like to be able to use an if-expression
> are precisely those, such as function arguments and lambda expressions,
> where if statements aren't allowed.
>
> --
> Andrew Koenig, ark at research.att.com, http://www.research.att.com/info/ark
Thus answering the question 'if we let it in will we get code that
is hard to read'. I want my control flow with indentation, please.
Laura Creighton
More information about the Python-list
mailing list