Barry Warsaw wrote:
> I'm not so sure. Once you start writing such a complicated thing, I think
> readability will favor just breaking the code out into traditional
> if-blocks. I'd be happy enough with just a binary condition.
Nothing prevents you from spreading the code over multiple lines, like so:
x = (if a then b
elif c then d
else e)
or even
x = (if a then
b
elif c then
d
else
e
)
especially as there are going to be parentheses around the whole thing
anyway. From a readability point of view, this is no different from
if-statement blocks, and the matter is IMO not worth dumbing down an
if-expression thingy as compared to its if-statement companion.
--
Thomas
_______________________________________________
Python-Dev mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe:
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com