Simple Dictionary Question

Ben Ocean zope at thewebsons.com
Fri May 4 14:59:06 EDT 2001


Hi;
I have this in a cgi script:
 >>>
    if form.has_key("token"):
      if i == "bladename":
        bladename = v
      if i == "bladephone":
        bladephone = v
      if i == "bladeemail":
        bladeemail = v
      if i == "token":
        token = v
<<<
Now, if the form has *token* it may have the others; if the others are 
present *token* will be as well. For some reason if mare than key *token* 
is present, the whole thing falls apart and all the values get set to None. 
Why?
TIA,
BenO





More information about the Python-list mailing list