if statement
Tim Golden
tim.golden at viacom-outdoor.co.uk
Mon Jun 28 08:38:15 EDT 2004
| Ajay >
|
| i get an error with the following code:
|
| num=0
| if contextForm.has_key("number"):
| num=contextForm["number"].value
| else:
| num=0
| num += 1
*What* error do you get? Is it an indentation error?
Does it run but produce the wrong result? Does it
give a Syntax error?
With the trivial addition of "contextForm = {}" at
the top, it runs without error on Python 2.2.3 under
Win2K.
More details?
TJG
________________________________________________________________________
This e-mail has been scanned for all viruses by Star Internet. The
service is powered by MessageLabs. For more information on a proactive
anti-virus service working around the clock, around the globe, visit:
http://www.star.net.uk
________________________________________________________________________
More information about the Python-list
mailing list