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


Groups > comp.lang.python > #57897

Re: Slicing with negative strides

From Mark Lawrence <breamoreboy@yahoo.co.uk>
Subject Re: Slicing with negative strides
Date 2013-10-29 09:34 +0000
References <526f45f8$0$6512$c3e8da3$5496439d@news.astraweb.com> <XnsA26858FD6F7E7duncanbooth@127.0.0.1>
Newsgroups comp.lang.python
Message-ID <mailman.1752.1383039312.18130.python-list@python.org> (permalink)

Show all headers | View raw


On 29/10/2013 08:53, Duncan Booth wrote:
> 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?
>

Umpteen options have been put forward.  IMHO the bookies favourite is 
currently being endorsed by Tim Peters and Terry Reedy, yours odds may 
vary :)

-- 
Python is the second best programming language in the world.
But the best has yet to be invented.  Christian Tismer

Mark Lawrence

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