mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
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:
parent
21431e85d5
commit
75a902db78
9 changed files with 43 additions and 51 deletions
|
@ -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))
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue