mirror of
https://github.com/python/cpython.git
synced 2025-10-15 03:10:29 +00:00
Remove the simple slicing API. All slicing is now done with slice objects.
This commit is contained in:
parent
582b586617
commit
d2cf20eea2
32 changed files with 78 additions and 810 deletions
|
@ -562,12 +562,10 @@ class BaseTest(unittest.TestCase):
|
|||
)
|
||||
|
||||
a = array.array(self.typecode, self.example)
|
||||
self.assertRaises(TypeError, a.__setslice__, 0, 0, None)
|
||||
self.assertRaises(TypeError, a.__setitem__, slice(0, 0), None)
|
||||
self.assertRaises(TypeError, a.__setitem__, slice(0, 1), None)
|
||||
|
||||
b = array.array(self.badtypecode())
|
||||
self.assertRaises(TypeError, a.__setslice__, 0, 0, b)
|
||||
self.assertRaises(TypeError, a.__setitem__, slice(0, 0), b)
|
||||
self.assertRaises(TypeError, a.__setitem__, slice(0, 1), b)
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue