blob: 9327c802a5d47c400a6de576da02a7b664f152c5 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
|
# test attributes of builtin range type
try:
range(0).start
except AttributeError:
import sys
print("SKIP")
sys.exit()
# attrs
print(range(1, 2, 3).start)
print(range(1, 2, 3).stop)
print(range(1, 2, 3).step)
# bad attr (can't store)
try:
range(4).start = 0
except AttributeError:
print('AttributeError')
|