[mod_python] Re: Quickie question for you

Jorey Bump list at joreybump.com
Thu Mar 17 12:22:26 EST 2005

Stephane Bortzmeyer wrote:

> I thought that it was a util.FieldStorage
> (http://www.modpython.org/live/current/doc-html/node92.html) which is
> not a dictionary?  Although is has __getattr__ so, in practice, your
> example works:
>> req.form['handle']
>> req.form['password']
>> req.form['login']

Yes, you're right, it's an instance that behaves like a dictionary, and 
responds to dictionary methods like req.form.has_key(), but isn't 
actually a dictionary. I oversimplified, but it's important to keep the 
distinction in mind.

More information about the Mod_python mailing list