summaryrefslogtreecommitdiffstats
path: root/Lib/encodings
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2007-10-19 22:06:24 (GMT)
committerGuido van Rossum <guido@python.org>2007-10-19 22:06:24 (GMT)
commit75a902db7859a4751743e98530c5d96a672641be (patch)
treea730c966dcfc993a800078004aae3a6094a75a6a /Lib/encodings
parent21431e85d505b9698c085c25cbf1b2997a352b85 (diff)
downloadcpython-75a902db7859a4751743e98530c5d96a672641be.zip
cpython-75a902db7859a4751743e98530c5d96a672641be.tar.gz
cpython-75a902db7859a4751743e98530c5d96a672641be.tar.bz2
Patch 1280, by Alexandre Vassalotti.
Make PyString's indexing and iteration return integers. (I changed a few of Alexandre's decisions -- GvR.)
Diffstat (limited to 'Lib/encodings')
-rw-r--r--Lib/encodings/__init__.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/Lib/encodings/__init__.py b/Lib/encodings/__init__.py
index ed25e91..87e5745 100644
--- a/Lib/encodings/__init__.py
+++ b/Lib/encodings/__init__.py
@@ -52,6 +52,8 @@ def normalize_encoding(encoding):
non-ASCII characters, these must be Latin-1 compatible.
"""
+ if isinstance(encoding, str8):
+ encoding = str(encoding, "ascii")
chars = []
punct = False
for c in encoding: