Patch 1280, by Alexandre Vassalotti.

Make PyString's indexing and iteration return integers.
(I changed a few of Alexandre's decisions -- GvR.)
This commit is contained in:
Guido van Rossum 2007-10-19 22:06:24 +00:00
parent 21431e85d5
commit 75a902db78
9 changed files with 43 additions and 51 deletions

View file

@ -348,7 +348,7 @@ class BytesTest(unittest.TestCase):
sample = str8("Hello world\n\x80\x81\xfe\xff")
buf = memoryview(sample)
b = bytes(buf)
self.assertEqual(b, bytes(map(ord, sample)))
self.assertEqual(b, bytes(sample))
def test_to_str(self):
sample = "Hello world\n\x80\x81\xfe\xff"