mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
SF patch #662433: Fill arraymodule's tp_iter and sq_contains slots
This commit is contained in:
parent
4e68a1ec6c
commit
625812f618
2 changed files with 127 additions and 2 deletions
|
@ -356,6 +356,12 @@ def testtype(type, example):
|
|||
a[2:3] = ins
|
||||
b[slice(2,3)] = ins
|
||||
c[2:3:] = ins
|
||||
# iteration and contains
|
||||
a = array.array(type, range(10))
|
||||
vereq(list(a), range(10))
|
||||
b = array.array(type, [20])
|
||||
vereq(a[-1] in a, True)
|
||||
vereq(b[0] not in a, True)
|
||||
|
||||
# test that overflow exceptions are raised as expected for assignment
|
||||
# to array of specific integral types
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue