Re: Slicing with negative strides

2013-11-06 Thread Peter Cacioppi
On Monday, October 28, 2013 10:22:00 PM UTC-7, Steven D'Aprano wrote: > Does anyone here use slices (or range/xrange) with negative strides other > > than -1? > Non default positive strides are very handy, but negative strides seem weird to me. Not the negative striding exactly, but the way fe

Re: Slicing with negative strides

2013-11-04 Thread Steven D'Aprano
On Mon, 04 Nov 2013 00:15:40 +0100, Martin Manns wrote: > On 29 Oct 2013 05:22:00 GMT > Steven D'Aprano wrote: > >> Does anyone here use slices (or range/xrange) with negative strides >> other than -1? > > I have used negative strides for comparing discrete sequences e. g. for > turbulence anal

Re: Slicing with negative strides

2013-11-03 Thread Martin Manns
On 29 Oct 2013 05:22:00 GMT Steven D'Aprano wrote: > Does anyone here use slices (or range/xrange) with negative strides > other than -1? I have used negative strides for comparing discrete sequences e. g. for turbulence analysis, and I hope that my code will still run in Python 4. Martin -- h

Re: Slicing with negative strides

2013-10-29 Thread Steven D'Aprano
ist, debating whether or not to deprecate or >> change the behaviour of slicing with negative strides. So if you care >> about the current behaviour, now is the time to stand up and be >> counted. >> >> (Standing up *here* is fine, don't feel that you have to jo

Re: Slicing with negative strides

2013-10-29 Thread Terry Reedy
On 10/29/2013 4:53 AM, Duncan Booth wrote: Steven D'Aprano 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 an

Re: Slicing with negative strides

2013-10-29 Thread Mark Lawrence
long, looong discussion) on the python-ideas mailing list, debating whether or not to deprecate or change the behaviour of slicing with negative strides. So if you care about the current behaviour, now is the time to stand up and be counted. (Standing up *here* is fine, don't feel that you have t

Re: Slicing with negative strides

2013-10-29 Thread Duncan Booth
iscussion) on > the python-ideas mailing list, debating whether or not to deprecate or > change the behaviour of slicing with negative strides. So if you care > about the current behaviour, now is the time to stand up and be > counted. > > (Standing up *here* is fine, don

Re: Slicing with negative strides

2013-10-29 Thread Mark Lawrence
On 29/10/2013 05:22, Steven D'Aprano wrote: Does anyone here use slices (or range/xrange) with negative strides other than -1? E.g. sequence[2:15:-3] In 10 ish years I don't recall ever considering it, let alone doing it. -- Python is the second best programming language in the world. But th

Slicing with negative strides

2013-10-28 Thread Steven D'Aprano
Does anyone here use slices (or range/xrange) with negative strides other than -1? E.g. sequence[2:15:-3] If so, there is a discussion (long, long, looong discussion) on the python-ideas mailing list, debating whether or not to deprecate or change the behaviour of slicing with negative