micropython/tests/basics/builtin_slice.py

Ignoring revisions in .git-blame-ignore-revs. Click here to bypass and see the normal blame view.

12 lines
168 B
Python
Raw Normal View History

# test builtin slice
# print slice
class A:
def __getitem__(self, idx):
print(idx)
return idx
s = A()[1:2:3]
# check type
print(type(s) is slice)