mirror of
https://github.com/python/cpython.git
synced 2025-10-10 00:43:41 +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
|
@ -674,8 +674,8 @@ def test_bool():
|
|||
elif not prefix and verbose:
|
||||
print('size of bool in native format is %i' % (len(packed)))
|
||||
|
||||
for c in str8('\x01\x7f\xff\x0f\xf0'):
|
||||
if struct.unpack('>t', c)[0] is not True:
|
||||
for c in b'\x01\x7f\xff\x0f\xf0':
|
||||
if struct.unpack('>t', bytes([c]))[0] is not True:
|
||||
raise TestFailed('%c did not unpack as True' % c)
|
||||
|
||||
test_bool()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue