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

@ -558,6 +558,10 @@ class CommonTest(BaseTest):
a = self.type2test('DNSSEC')
b = self.type2test('')
for c in a:
# Special case for the str8, since indexing returns a integer
# XXX Maybe it would be a good idea to seperate str8's tests...
if self.type2test == str8:
c = chr(c)
b += c
hash(b)
self.assertEqual(hash(a), hash(b))