<div class="gmail_quote">On Fri, Jan 8, 2010 at 3:21 PM, MRAB <span dir="ltr"><<a href="mailto:python@mrabarnett.plus.com">python@mrabarnett.plus.com</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
Victor Subervi wrote:<div><div></div><div class="h5"><br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
On Fri, Jan 8, 2010 at 1:26 PM, Steve Holden <<a href="mailto:steve@holdenweb.com" target="_blank">steve@holdenweb.com</a> <mailto:<a href="mailto:steve@holdenweb.com" target="_blank">steve@holdenweb.com</a>>> wrote:<br>

<br>
    MRAB wrote:<br>
     > Victor Subervi wrote:<br>
     > [snip]<br>
     >><br>
     >> Code snippet:<br>
     >><br>
     >> def cgiFieldStorageToDict(fieldStorage):<br>
                                ^^^^^^^^^^^^<br>
    Further hint ...<br>
<br>
     >>   params = {}<br>
     >>   for key in fieldStorage.keys():<br>
     >>     params[key] = cgi.FieldStorage[key].value<br>
     >                     ^^^^^^^^^^^^^^^^^^^^^<br>
     > This is your problem.<br>
<br>
<br>
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<br>

<br>
</blockquote></div></div>
If you got it from:<br>
<br>
    Recipe 81547: Using a simple dictionary for CGI parameters<br>
    <a href="http://code.activestate.com/recipes/81547/" target="_blank">http://code.activestate.com/recipes/81547/</a><br>
<br>
then no, it wasn't "exactly copied". If you'd copy-and-pasted it then it<br>
would've been correct, as well as much quicker to do...</blockquote><div><br>I'm afraid to say you're right again :-}<br>beno<br>
</div></div>