summaryrefslogtreecommitdiffstats
path: root/Lib/test/test_slice.py
diff options
context:
space:
mode:
authorThomas Wouters <thomas@python.org>2007-08-30 22:57:53 (GMT)
committerThomas Wouters <thomas@python.org>2007-08-30 22:57:53 (GMT)
commitd2cf20eea2338a0369d4a5707adb01b201f7dfb2 (patch)
tree59fd4a094906997ae2b0cd520ff09010457da680 /Lib/test/test_slice.py
parent582b5866174d20f7c027cbb6fb757fefb382f96f (diff)
downloadcpython-d2cf20eea2338a0369d4a5707adb01b201f7dfb2.zip
cpython-d2cf20eea2338a0369d4a5707adb01b201f7dfb2.tar.gz
cpython-d2cf20eea2338a0369d4a5707adb01b201f7dfb2.tar.bz2
Remove the simple slicing API. All slicing is now done with slice objects.
Diffstat (limited to 'Lib/test/test_slice.py')
-rw-r--r--Lib/test/test_slice.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/Lib/test/test_slice.py b/Lib/test/test_slice.py
index 97b3084..cb9d8b2 100644
--- a/Lib/test/test_slice.py
+++ b/Lib/test/test_slice.py
@@ -99,12 +99,12 @@ class SliceTest(unittest.TestCase):
def test_setslice_without_getslice(self):
tmp = []
class X(object):
- def __setslice__(self, i, j, k):
- tmp.append((i, j, k))
+ def __setitem__(self, i, k):
+ tmp.append((i, k))
x = X()
x[1:2] = 42
- self.assertEquals(tmp, [(1, 2, 42)])
+ self.assertEquals(tmp, [(slice(1, 2), 42)])
def test_pickle(self):
s = slice(10, 20, 3)