FW: [Python-Dev] conditional expressions?
Paul Rubin
phr-n2001d at nightsong.com
Mon Oct 15 20:27:19 EDT 2001
m.faassen at vet.uu.nl (Martijn Faassen) writes:
> * list comprehensions are signalled by the fairly clear [ and ].
> Conditional expressions use the already fairly strongly
> overloaded ( and ). Of course I guess they wouldn't really
> overload them further, but..
A conditional expression analogy to list comprehensions would be
x = (a if b else c)
rather than
x = if a then b else c
More information about the Python-list
mailing list