Fix for Issue8135 - urllib.unquote to support mixed percent escapes
diff --git a/Lib/urllib.py b/Lib/urllib.py
index 58e750a..c74dd3c 100644
--- a/Lib/urllib.py
+++ b/Lib/urllib.py
@@ -1158,8 +1158,8 @@
     if match: return match.group(1, 2)
     return attr, None
 
-_hextochr = dict(('%02x' % i, chr(i)) for i in range(256))
-_hextochr.update(('%02X' % i, chr(i)) for i in range(256))
+_hexdig = '0123456789ABCDEFabcdef'
+_hextochr = dict((a+b, chr(int(a+b,16))) for a in _hexdig for b in _hexdig)
 
 def unquote(s):
     """unquote('abc%20def') -> 'abc def'."""