py: Add support for start/stop/step attributes of builtin range object.

This commit is contained in:
Peter D. Gray
2015-03-06 14:48:14 -05:00
committed by Damien George
parent 5be4a84a58
commit b2a237d337
4 changed files with 33 additions and 0 deletions

View File

@@ -24,3 +24,8 @@ print(range(4)[1:2])
print(range(4)[1:3])
print(range(4)[1::2])
print(range(4)[1:-2:2])
# attrs
print(range(1, 2, 3).start)
print(range(1, 2, 3).stop)
print(range(1, 2, 3).step)