Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.python > #57894

Re: Slicing with negative strides

From Duncan Booth <duncan.booth@invalid.invalid>
Newsgroups comp.lang.python
Subject Re: Slicing with negative strides
Date 2013-10-29 08:53 +0000
Message-ID <XnsA26858FD6F7E7duncanbooth@127.0.0.1> (permalink)
References <526f45f8$0$6512$c3e8da3$5496439d@news.astraweb.com>

Show all headers | View raw


Steven D'Aprano <steve@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.

> 
> 
> If so, there is a discussion (long, long, looooooong 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 to join yet
> another list.)
> 
For those of us that don't really want to join another mailing list, could 
you summarise what change is being proposed?


-- 
Duncan Booth http://kupuguy.blogspot.com

Back to comp.lang.python | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Slicing with negative strides Steven D'Aprano <steve@pearwood.info> - 2013-10-29 05:22 +0000
  Re: Slicing with negative strides Duncan Booth <duncan.booth@invalid.invalid> - 2013-10-29 08:53 +0000
    Re: Slicing with negative strides Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-29 09:34 +0000
    Re: Slicing with negative strides Terry Reedy <tjreedy@udel.edu> - 2013-10-29 06:21 -0400
    Re: Slicing with negative strides Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-10-29 11:04 +0000
  Re: Slicing with negative strides Mark Lawrence <breamoreboy@yahoo.co.uk> - 2013-10-29 08:54 +0000
  Re: Slicing with negative strides Martin Manns <mmanns@gmx.net> - 2013-11-04 00:15 +0100
    Re: Slicing with negative strides Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2013-11-04 15:18 +0000
  Re: Slicing with negative strides Peter Cacioppi <peter.cacioppi@gmail.com> - 2013-11-06 11:15 -0800

csiph-web