beginner python cgi question

Andrew Clover and-google at
Sun Dec 14 13:28:20 CET 2003

Jochen Wersdörfer <jochen at> wrote:

> Address = fields.get("address", "n/a")

(You mean fields.getvalue, natch.)

If you don't want to have to deal with cgi returning a list sometimes, what
you really want is fields.getfirst('fieldname', 'default'), but this only
exists in Python 2.2 onwards.

Andrew Clover
mailto:and at

More information about the Python-list mailing list