[Python-Dev] [RFC] urlparse - parse query facility
orsenthil at users.sourceforge.net
Sat Jun 16 06:04:59 CEST 2007
* Fred L. Drake, Jr. <fdrake at acm.org> [2007-06-13 22:42:21]:
> I see no reason to incorporate the URL splitting into the function; the
> existing function signatures for cgi.parse_qs and cgi.parse_qsl are
Thanks for the comments, Fred. I understand, that having the signatures of
parse_qs and parse_qsl are sufficient in the urlparse module and invoking the
same from cgi module will be correct.
The urlparse will cotain parse_qs and parse_qsl takes the query string (not
url) and with optional arguments keep_blank_values and strict_parsing (same as cgi).
> It may be convenient to add methods to the urlparse.BaseResult class providing
> access to the parsed version of the query on the instance.
This is where, I spent a little bit time and I am unable to comeout
conclusively as how it can be done.
Someone in the list, please help me.
* parse_qs or parse_qsl will be invoked on the query component separately by
* If parsed query needs to be available at the instance as a convenience
function, then we will have to assume the keep_blank_values and strict_parsing
* Coding question: Without retyping the bunch of code again in the BaseResult,
would is the possible to call parse_qs/parse_qsl function on self.query and
provide the result? Basically, what would be a good of doing it.
More information about the Python-Dev