[Python-checkins] r51290 - python/trunk/Lib/Cookie.py python/trunk/Lib/string.py
georg.brandl
python-checkins at python.org
Tue Aug 15 00:01:24 CEST 2006
Author: georg.brandl
Date: Tue Aug 15 00:01:24 2006
New Revision: 51290
Modified:
python/trunk/Lib/Cookie.py
python/trunk/Lib/string.py
Log:
Cookie.py shouldn't "bogusly" use string._idmap.
Modified: python/trunk/Lib/Cookie.py
==============================================================================
--- python/trunk/Lib/Cookie.py (original)
+++ python/trunk/Lib/Cookie.py Tue Aug 15 00:01:24 2006
@@ -304,9 +304,11 @@
'372円' : '\372円', '373円' : '\373円', '374円' : '\374円',
'375円' : '\375円', '376円' : '\376円', '377円' : '\377円'
}
+
+_idmap = ''.join(chr(x) for x in xrange(256))
def _quote(str, LegalChars=_LegalChars,
- idmap=string._idmap, translate=string.translate):
+ idmap=_idmap, translate=string.translate):
#
# If the string does not need to be double-quoted,
# then just return the string. Otherwise, surround
@@ -440,7 +442,7 @@
def set(self, key, val, coded_val,
LegalChars=_LegalChars,
- idmap=string._idmap, translate=string.translate ):
+ idmap=_idmap, translate=string.translate):
# First we verify that the key isn't a reserved word
# Second we make sure it only contains legal characters
if key.lower() in self._reserved:
Modified: python/trunk/Lib/string.py
==============================================================================
--- python/trunk/Lib/string.py (original)
+++ python/trunk/Lib/string.py Tue Aug 15 00:01:24 2006
@@ -35,7 +35,6 @@
# Case conversion helpers
# Use str to convert Unicode literal in case of -U
-# Note that Cookie.py bogusly uses _idmap :(
l = map(chr, xrange(256))
_idmap = str('').join(l)
del l
More information about the Python-checkins
mailing list