Skip to content

Commit bc5b896

Browse files
committed
tests/basics/builtin_slice: Add test for "slice" builtin name.
1 parent bdb0d2d commit bc5b896

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

tests/basics/builtin_slice.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,4 +4,8 @@
44
class A:
55
def __getitem__(self, idx):
66
print(idx)
7-
A()[1:2:3]
7+
return idx
8+
s = A()[1:2:3]
9+
10+
# check type
11+
print(type(s) is slice)

0 commit comments

Comments
 (0)