bearophileh...@lycos.com wrote:
Chris Rebert:
That seems to just be an overly complicated way of writing:
spaces = bool(form.has_key('spaces') and form.getvalue('spaces') == 1)
Better:
spaces = bool(('spaces' in form) and form.getvalue('spaces') == 1)
Is it still necessary to convert the
On Mar 4, 10:53 am, Mel mwil...@the-wire.com wrote:
bearophileh...@lycos.com wrote:
Chris Rebert:
That seems to just be an overly complicated way of writing:
spaces = bool(form.has_key('spaces') and form.getvalue('spaces') == 1)
Better:
spaces = bool(('spaces' in form) and
Steve Holden a écrit :
Anjanesh Lekshminarayanan wrote:
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 :
On 3/2/09 12:53 AM, Bruno Desthuilliers wrote:
Steve Holden a écrit :
Anjanesh Lekshminarayanan wrote:
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')
On Feb 27, 7:55 pm, bearophileh...@lycos.com wrote:
Chris Rebert:
That seems to just be an overly complicated way of writing:
spaces = bool(form.has_key('spaces') and form.getvalue('spaces') == 1)
Better:
spaces = bool(('spaces' in form) and form.getvalue('spaces') == 1)
Huh?? Much
Chris Rebert:
That seems to just be an overly complicated way of writing:
spaces = bool(form.has_key('spaces') and form.getvalue('spaces') == 1)
Better:
spaces = bool(('spaces' in form) and form.getvalue('spaces') == 1)
Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list
Anjanesh Lekshminarayanan wrote:
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
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
--
Anjanesh Lekshminarayanan wrote:
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
If you've got any sense
On Thu, Feb 26, 2009 at 7:11 PM, Anjanesh Lekshminarayanan
m...@anjanesh.net wrote:
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
On 2009-02-27, Anjanesh Lekshminarayanan m...@anjanesh.net wrote:
How do I achieve something like this using python ?
spaces = (form.has_key('spaces') ? form.getvalue('spaces') == 1 ? True :
False : False)
if form.has_key('spaces'):
spaces = form.getvalue('spaces') == 1
else:
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
On 2009-02-27, Paul Rubin http wrote:
But the == 1 comparison will always fail, since getvalue returns a string.
How do we know that from the what the OP posted?
--
Grant
--
http://mail.python.org/mailman/listinfo/python-list
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
On Thu, Feb 26, 2009 at 8:39 PM, Anjanesh Lekshminarayanan
m...@anjanesh.net wrote:
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') ?
15 matches
Mail list logo