Details
-
Improvement
-
Status: Closed
-
Major
-
Resolution: Abandoned
-
None
-
None
Description
Currently, the PyDML range(...) function requires start, stop, and step arguments. In Python [1], range(...) comes in two forms: one form only has a stop parameter, as in range(stop), and the other form has both the start and stop parameters, with an optional step parameter. It is quite common to simply use an upper stop argument, i.e. range(10), to create a list from 0 up to, but not including, stop.
*Note*: The upper bound stop should also be exclusive, as noted above, i.e., range(4) should return a vector [0,1,2,3], rather than [0,1,2,3,4].
*Note #2*: This should also be applicable when used with for expressions, i.e.:
for i in range(12):
print(i)
We should improve the PyDML range(...) function to be more inline with that of Python, as described above.