[Python-checkins] cpython (2.7): Backed out changeset ee51e3aef302 - it broke the test suite

antoine.pitrou python-checkins at python.org
Fri Jun 29 21:55:56 CEST 2012


http://hg.python.org/cpython/rev/264892c47681
changeset:   77858:264892c47681
branch:      2.7
parent:      77855:ee51e3aef302
user:        Antoine Pitrou <solipsis at pitrou.net>
date:        Fri Jun 29 21:53:29 2012 +0200
summary:
  Backed out changeset ee51e3aef302 - it broke the test suite

files:
  Lib/urlparse.py |  17 ++++++++---------
  1 files changed, 8 insertions(+), 9 deletions(-)


diff --git a/Lib/urlparse.py b/Lib/urlparse.py
--- a/Lib/urlparse.py
+++ b/Lib/urlparse.py
@@ -127,8 +127,8 @@
     Return a 6-tuple: (scheme, netloc, path, params, query, fragment).
     Note that we don't break the components up in smaller bits
     (e.g. netloc is a single string) and we don't expand % escapes."""
-    splitresult = urlsplit(url, scheme, allow_fragments)
-    scheme, netloc, url, query, fragment = splitresult
+    tuple = urlsplit(url, scheme, allow_fragments)
+    scheme, netloc, url, query, fragment = tuple
     if scheme in uses_params and ';' in url:
         url, params = _splitparams(url)
     else:
@@ -225,8 +225,7 @@
     empty query; the RFC states that these are equivalent)."""
     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
+        if url and url[:1] != '/': url = '/' + url
         url = '//' + (netloc or '') + url
     if scheme:
         url = scheme + ':' + url
@@ -308,7 +307,7 @@
 # update it also in urllib.  This code duplication does not existin in Python3.
 
 _hexdig = '0123456789ABCDEFabcdef'
-_hextochr = dict((a+b, chr(int(a+b, 16)))
+_hextochr = dict((a+b, chr(int(a+b,16)))
                  for a in _hexdig for b in _hexdig)
 
 def unquote(s):
@@ -345,13 +344,13 @@
             If false (the default), errors are silently ignored.
             If true, errors raise a ValueError exception.
     """
-    parsed_result = {}
+    dict = {}
     for name, value in parse_qsl(qs, keep_blank_values, strict_parsing):
         if name in dict:
-            parsed_result[name].append(value)
+            dict[name].append(value)
         else:
-            parsed_result[name] = [value]
-    return parsed_result
+            dict[name] = [value]
+    return dict
 
 def parse_qsl(qs, keep_blank_values=0, strict_parsing=0):
     """Parse a query given as a string argument.

-- 
Repository URL: http://hg.python.org/cpython


More information about the Python-checkins mailing list