[Python-ideas] Where did we go wrong with negative stride?

Greg Ewing greg.ewing at canterbury.ac.nz
Tue Oct 29 06:11:59 CET 2013


Tim Peters wrote:
> BTW, do you know of any real code that uses a negative stride other
> than -1?  Still looking for a real example of that.

I tend to scrupulously avoid writing any such code,
precisely because it's so hard to figure out what it
will mean!

I'm even a bit wary of using -1, preferring to use
reversed() if possible.

-- 
Greg


More information about the Python-ideas mailing list