parse_qs ... why dictionarykey : list ?

Brian Donovan lists at lophty.com
Wed Jul 31 14:20:21 EDT 2002


I've been working on a small project using, among other modules,
Python's cgi mod and have a couple of questions.  I've read the docs,
Google'd, and searched the comp.lang.python archives for an answer, but
have come up empty so far.

(1.) Why does cgi's parse_qs return each of the param:value pairs in a
querystring as a dictionary key and a list?

(2.) How does one format a query string so that lists can actually be
passed to a Python script via querystring so that parse_qs will "see"
them? [I've futzed around a bit but haven't stumbled on how it's done.]

I apologize if this is a dumb question.  :D

Thanks in advance,
-brian




More information about the Python-list mailing list