Simple Dictionary Question

Dimitar Haralanov dimitarh at inktomi.com
Fri May 4 20:19:06 EDT 2001


	I assume that v is the value of the *token* in which case, you have to
set it to the value after you make sure that the *token* is there:

	if form.has_key("token"):
	  v = form["token"].value
	  ...
	  
		Mitko

On Fri, 04 May 2001 11:59:06 -0700
Ben Ocean <zope at thewebsons.com> wrote:

> 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