You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
18 lines
323 B
18 lines
323 B
# test attributes of builtin range type
|
|
|
|
try:
|
|
range(0).start
|
|
except AttributeError:
|
|
print("SKIP")
|
|
raise SystemExit
|
|
|
|
# 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')
|
|
|