On 10/29/2013 4:53 AM, Duncan Booth wrote:
Steven D'Aprano <st...@pearwood.info> wrote:

Does anyone here use slices (or range/xrange) with negative strides
other than -1?

E.g. sequence[2:15:-3]

With any negative stride your example is just the empty sequence.

The idea is that one would not have to reverse 2 and 15 to get a non-empty sequence.

--
Terry Jan Reedy

--
https://mail.python.org/mailman/listinfo/python-list

Reply via email to