Multiple conditional expression

Anjanesh Lekshminarayanan mail at anjanesh.net
Thu Feb 26 23:39:39 EST 2009


> How do we know that from the what the OP posted?
Its CGI alright.
spaces = form.has_key('spaces') and form.getvalue('spaces') == '1'

But I just dont see how
spaces = (form.has_key('spaces') ? form.getvalue('spaces') == 1 ?
True: False : False)
is complicated in anyway. Its not that hard to read at all.

Thanks.



More information about the Python-list mailing list