Oct. 30, 2013
11:22 a.m.
On 30 October 2013 20:13, Oscar Benjamin <oscar.j.benjamin@gmail.com> wrote:
But you currently need to write it that way to get the correct behaviour:
for n in reversed(range(4)): ... print(n, a[len(a)-n:]) ... 3 cde 2 de 1 e 0
Regardless, my main point is this: slices are just objects. The syntax: s[i:j:k] is just syntactic sugar for: s[slice(i, j, k)] That means that until people have fully explored exactly the semantics they want in terms of the existing object model, just as I did for rslice(), then there are *zero* grounds to be discussing syntax changes that provide those new semantics. Regards, Nick. -- Nick Coghlan | ncoghlan@gmail.com | Brisbane, Australia