getfirst and re

Victor Subervi victorsubervi at gmail.com
Fri Jan 8 14:02:41 EST 2010


On Fri, Jan 8, 2010 at 2:52 PM, Jean-Michel Pichavant <
jeanmichel at sequans.com> wrote:

> Victor Subervi wrote:
>
>  On Fri, Jan 8, 2010 at 1:26 PM, Steve Holden <steve at holdenweb.com<mailto:
>> steve at holdenweb.com>> wrote:
>>
>>    MRAB wrote:
>>    > Victor Subervi wrote:
>>    > [snip]
>>    >>
>>    >> Code snippet:
>>    >>
>>    >> def cgiFieldStorageToDict(fieldStorage):
>>                                ^^^^^^^^^^^^
>>    Further hint ...
>>
>>    >>   params = {}
>>    >>   for key in fieldStorage.keys():
>>    >>     params[key] = cgi.FieldStorage[key].value
>>    >                     ^^^^^^^^^^^^^^^^^^^^^
>>    > This is your problem.
>>
>>
>> The problem is that I don't understand this code that I exactly copied
>> from a Web page tutorial. Can you folks point me to tutorials where I can
>> learn to comprehend this code? Specifically, the line in question. How is it
>> that one can code "params[key]" (what does that mean?) and the other side,
>> what does that mean
>>
> I think you are gathering more fans Victor :)
>

Fans? You aught to hear me sing. I didn't think I'd gain fans here LOL!

>
> http://docs.python.org/tutorial/datastructures.html#dictionaries
>

Thanks,
beno
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-list/attachments/20100108/f102a9aa/attachment-0001.html>


More information about the Python-list mailing list