For review: PEP 308 - If-then-else expression
Andrew Koenig
ark at research.att.com
Fri Feb 7 21:21:40 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
More information about the Python-list
mailing list