Multiple conditional expression

Anjanesh Lekshminarayanan mail at anjanesh.net
Thu Feb 26 22:11:18 EST 2009


How do I achieve something like this using python ?
spaces = (form.has_key('spaces') ? form.getvalue('spaces') == 1 ? True
: False : False)

spaces = True if form.getvalue('spaces') == 1 if
form.has_key('spaces') else False else False
-- 
Anjanesh Lekshmnarayanan



More information about the Python-list mailing list