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