Kaydet (Commit) 8c8a02a2 authored tarafından Guido van Rossum's avatar Guido van Rossum

speed up unquote() by using atoi() instead of eval()

üst 44a4d59b
......@@ -645,7 +645,7 @@ def unquote(s):
if j < 0:
res = res + s[i:]
break
res = res + (s[i:j] + chr(eval('0x' + s[j+1:j+3])))
res = res + (s[i:j] + chr(string.atoi(s[j+1:j+3], 16)))
i = j+3
return res
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment