[stdlib-sig] Any ideas on how to handle urllib, urllib2, and urlparse?

Brett Cannon brett at python.org
Wed Feb 20 11:39:09 CET 2008


Dealing with the URL-related modules is the last specific thing I want
to deal with in terms of new packages. The problem is that urllib and
urllib2 each have a key function that are named the same thing with
slightly different parameters and returning objects that have the same
base interface but are different classes and provide a different way
to overload what gets returned.

Doing something like:

urllib -> url.fetch (not url.open since url.open.urlopen() looks weird)
urllib2 -> url.fetch2
urlparse -> url.parse

seems somewhat silly, but the best I can think of right now. I could
ask the web-sig if they think we could try to get rid of either urllib
or urllib2, but I suspect they will say no.

-Brett


More information about the stdlib-sig mailing list