Convert empty string literal to string. Speed up creation of idmap.

This commit is contained in:
Martin v. Löwis 2002-10-14 20:03:40 +00:00
parent bbc0568a5c
commit 5357c6511d
1 changed files with 4 additions and 3 deletions

View File

@ -34,9 +34,10 @@ punctuation = """!"#$%&'()*+,-./:;<=>?@[\]^_`{|}~"""
printable = digits + letters + punctuation + whitespace printable = digits + letters + punctuation + whitespace
# Case conversion helpers # Case conversion helpers
_idmap = '' # Use str to convert Unicode literal in case of -U
for i in range(256): _idmap = _idmap + chr(i) l = map(chr, xrange(256))
del i _idmap = str('').join(l)
del l
# Backward compatible names for exceptions # Backward compatible names for exceptions
index_error = ValueError index_error = ValueError