Rietveld Code Review Tool
Help | Bug tracker | Discussion group | Source code | Sign in
(373)

Unified Diff: Lib/codecs.py

Issue 14874: Faster charmap decoding (Closed)
Patch Set: Created 12 months ago
Use n/p to move between diff chunks; N/P to move between comments. Please Sign in to add in-line comments.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | Lib/encodings/cp037.py » ('j') | Objects/unicodeobject.c » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
--- a/Lib/codecs.py Mon May 21 20:28:58 2012 +0200
+++ b/Lib/codecs.py Tue May 22 01:11:31 2012 +0300
@@ -1042,10 +1042,7 @@
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):
« no previous file with comments | « no previous file | Lib/encodings/cp037.py » ('j') | Objects/unicodeobject.c » ('J')

RSS Feeds Recent Issues | This issue
This is Rietveld cbc36f91f3f7