Chris Rebert <c...@rebertia.com> writes: > spaces = bool(form.has_key('spaces') and form.getvalue('spaces') == 1)
spaces = form.has_key('spaces') and form.getvalue('spaces') == 1 or even (this is about the cgi module, I think) spaces = form.getvalue('spaces', None) == 1 But the == 1 comparison will always fail, since getvalue returns a string. -- http://mail.python.org/mailman/listinfo/python-list