John Machin wrote:

There is an even more unreadable hack (due to Tim Peters IIRC) that
avoides the false-then problem:

(cond and [then_value] or [else_value])[0]

The correct attribution is "due to Tim Peters (who wishes it was Steve Majewski)."

</F>

--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to