The current syntax is very verbose to write, holding nothing against python's own a[2:, :2] syntax.
This would require an addition to the godot language though, because it's a syntax change. Specifically, two things would be very helpful:
1) Array access would need to support multiple objects (a[b, c]). This could be achieved by either
Making all array accesses use varargs
Auto-expanding the given tuple into the corresponding subscript function, if the number of given parameters match the number of needed ones
2) start:stop:step syntax, or an equivalent, would need to be supported.
I'm much more on board with 1) than I am with 2), because the a[start:stop:step] syntax has always felt pretty arbitrary to me. I don't have a better suggestion right now, but I'm sure we can find something that isn't so explicitly python.
The current syntax is very verbose to write, holding nothing against python's own
a[2:, :2]
syntax.This would require an addition to the godot language though, because it's a syntax change. Specifically, two things would be very helpful:
1) Array access would need to support multiple objects (
a[b, c]
). This could be achieved by eitherstart:stop:step
syntax, or an equivalent, would need to be supported.I'm much more on board with 1) than I am with 2), because the
a[start:stop:step]
syntax has always felt pretty arbitrary to me. I don't have a better suggestion right now, but I'm sure we can find something that isn't so explicitly python.