The result objects from the urlparse() and urlsplit() functions are subclasses of the tuple type. These subclasses add the attributes described in those functions, as well as provide an additional method:
) |
The result of this method is a fixpoint if passed back through the original parsing function:
>>> import urlparse >>> url = 'HTTP://www.Python.org/doc/#' >>> r1 = urlparse.urlsplit(url) >>> r1.geturl() 'http://www.Python.org/doc/' >>> r2 = urlparse.urlsplit(r1.geturl()) >>> r2.geturl() 'http://www.Python.org/doc/'
New in version 2.5.
The following classes provide the implementations of the parse results::
scheme, netloc, path, params, query, fragment) |
scheme, netloc, path, query, fragment) |