Commits

Konstantin Lopuhin  committed 134ddde

avoid extra copy

  • Participants
  • Parent commits f505dfc
  • Branches unquote-faster

Comments (0)

Files changed (2)

File lib-python/2.7/urllib.py

     if len(res) == 1:
         return s
     res_list = [res[0]]
-    for item in res[1:]:
+    for j in xrange(1, len(res)):
+        item = res[j]
         try:
             x = _hextochr[item[:2]] + item[2:]
         except KeyError:

File lib-python/2.7/urlparse.py

     if len(res) == 1:
         return s
     res_list = [res[0]]
-    for item in res[1:]:
+    for j in xrange(1, len(res)):
+        item = res[j]
         try:
             x = _hextochr[item[:2]] + item[2:]
         except KeyError: