2017-02-14 21:57:56 +00:00
|
|
|
# test attributes of builtin range type
|
|
|
|
|
|
|
|
try:
|
|
|
|
range(0).start
|
|
|
|
except AttributeError:
|
|
|
|
print("SKIP")
|
2017-06-10 18:03:01 +01:00
|
|
|
raise SystemExit
|
2017-02-14 21:57:56 +00:00
|
|
|
|
|
|
|
# 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')
|