If no stop position is given, it is assumed to be the length of the array if the given step is greater than 0 or 0 if the given step is less than 0.
When step is negative, it is not equivalent to 0, but to -length-1 both in Python and in the json-formula implementation, as with 0 first element is not included:
Specifically this line:
When step is negative, it is not equivalent to
0
, but to-length-1
both in Python and in the json-formula implementation, as with0
first element is not included:[0,1,2,3][::-1] ->[3,2,1,0]
[0,1,2,3][:0:-1] ->[3,2,1]
[0,1,2,3][:-5:-1] ->[3,2,1,0]