mirror of
https://github.com/python/cpython.git
synced 2025-08-22 09:45:06 +00:00
Issue #14874: Restore charmap decoding speed to pre-PEP 393 levels.
Patch by Serhiy Storchaka.
This commit is contained in:
parent
c62bd13cb2
commit
aaefac76dd
11 changed files with 1123 additions and 431 deletions
|
@ -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):
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue