Issue #14874: Restore charmap decoding speed to pre-PEP 393 levels.

Patch by Serhiy Storchaka.
This commit is contained in:
Antoine Pitrou 2012-06-16 22:48:21 +02:00
parent c62bd13cb2
commit aaefac76dd
11 changed files with 1123 additions and 431 deletions

View file

@ -1042,10 +1042,7 @@ def make_identity_dict(rng):
mapped to themselves.
"""
res = {}
for i in rng:
res[i]=i
return res
return {i:i for i in rng}
def make_encoding_map(decoding_map):