summaryrefslogtreecommitdiffstatshomepage
path: root/tests/basics/slice_attrs.py
blob: 76368a78c6cda48b86a3764083b2f6c6f0775c3a (plain) (blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
# test builtin slice attributes access

# print slice attributes
class A:
    def __getitem__(self, idx):
        print(idx.start, idx.stop, idx.step)

try:
    t = A()[1:2]
except:
    import sys
    print("SKIP")
    sys.exit()


A()[1:2:3]