On Tue, 2005-09-20 at 18:21, Thomas Lotze wrote: > 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.
I guess that's my point. To me, your latter is actually worse than if a: x = b elif c: x = d else: x = e I think the conditional stuff gets the most bang for the buck in situations like: d[foo] = if a then b else c -Barry
signature.asc
Description: This is a digitally signed message part
_______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com