[Python-checkins] r65423 - python/trunk/Lib/urlparse.py

brett.cannon python-checkins at python.org
Sun Aug 3 02:51:02 CEST 2008


Author: brett.cannon
Date: Sun Aug  3 02:51:02 2008
New Revision: 65423

Log:
Silence some SyntaxWarnings for tuple unpacking in a parameter list for
urlparse when run under -3.


Modified:
   python/trunk/Lib/urlparse.py

Modified: python/trunk/Lib/urlparse.py
==============================================================================
--- python/trunk/Lib/urlparse.py	(original)
+++ python/trunk/Lib/urlparse.py	Sun Aug  3 02:51:02 2008
@@ -173,16 +173,18 @@
     _parse_cache[key] = v
     return v
 
-def urlunparse((scheme, netloc, url, params, query, fragment)):
+def urlunparse(data):
     """Put a parsed URL back together again.  This may result in a
     slightly different, but equivalent URL, if the URL that was parsed
     originally had redundant delimiters, e.g. a ? with an empty query
     (the draft states that these are equivalent)."""
+    scheme, netloc, url, params, query, fragment = data
     if params:
         url = "%s;%s" % (url, params)
     return urlunsplit((scheme, netloc, url, query, fragment))
 
-def urlunsplit((scheme, netloc, url, query, fragment)):
+def urlunsplit(data):
+    scheme, netloc, url, query, fragment = data
     if netloc or (scheme and scheme in uses_netloc and url[:2] != '//'):
         if url and url[:1] != '/': url = '/' + url
         url = '//' + (netloc or '') + url


More information about the Python-checkins mailing list