[Python-bugs-list] [ python-Feature Requests-600362 ] relocate cgi.parse_qs() into urlparse

SourceForge.net noreply@sourceforge.net
Mon, 12 May 2003 20:25:22 -0700


Feature Requests item #600362, was opened at 2002-08-26 11:24
Message generated for change (Comment added) made by bcannon
You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=600362&group_id=5470

Category: None
Group: None
Status: Open
Resolution: None
Priority: 5
Submitted By: Danny Yoo (dyoo)
Assigned to: Nobody/Anonymous (nobody)
Summary: relocate cgi.parse_qs() into urlparse

Initial Comment:
The location of the url-handling functions are
distributed among several modules, and it would be good
to consolidate them to make them easier to find.

The urlparse.urlparse() function splits an url into its
relative pieces.  However, it does not parse out the
query string into a dictionary --- that role is played
by cgi.parse_qs().  And to convert a dictionary back to
a query string, the programmer needs to know that that
function is in urllib.urlencode.


It would be nice to have cgi.parse_qs() and
urllib.urlencode() in a unified place, within in the
urlparse module if appropriate.  This will help reduce
the amount of hunting-and-pecking that beginners do
when they're trying to deal with URLs.


See:

http://mail.python.org/pipermail/tutor/2002-August/016823.html

for more information.

Thanks!

----------------------------------------------------------------------

>Comment By: Brett Cannon (bcannon)
Date: 2003-05-12 20:25

Message:
Logged In: YES 
user_id=357491

This is a problem.  Should a wrapper in urlparse for cgi.parse_qs but created 
or should it just be documented that to parse a query string you should use 
cgi.parse_qs?

----------------------------------------------------------------------

You can respond by visiting: 
https://sourceforge.net/tracker/?func=detail&atid=355470&aid=600362&group_id=5470