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


Groups > comp.lang.python > #57897

Re: Slicing with negative strides

Path csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!news.tele.dk!feed118.news.tele.dk!news.tele.dk!small.news.tele.dk!newsgate.cistron.nl!newsgate.news.xs4all.nl!post.news.xs4all.nl!not-for-mail
Return-Path <python-python-list@m.gmane.org>
X-Original-To python-list@python.org
Delivered-To python-list@mail.python.org
X-Spam-Status OK 0.003
X-Spam-Evidence '*H*': 0.99; '*S*': 0.00; 'from:addr:yahoo.co.uk': 0.04; 'booth': 0.09; 'lawrence': 0.09; 'received:80.91': 0.09; 'received:80.91.229': 0.09; 'received:gmane.org': 0.09; 'received:list': 0.09; 'slices': 0.09; 'tismer': 0.09; 'python': 0.11; 'list.)': 0.16; 'peters': 0.16; 'received:80.91.229.3': 0.16; 'received:92.29': 0.16; 'received:plane.gmane.org': 0.16; 'sequence.': 0.16; 'stride': 0.16; 'umpteen': 0.16; 'language': 0.16; 'wrote:': 0.18; 'discussion': 0.18; 'example': 0.22; 'programming': 0.22; 'header:User-Agent:1': 0.23; '(or': 0.24; 'options': 0.25; 'long,': 0.26; 'second': 0.26; 'header:X -Complaints-To:1': 0.27; 'header:In-Reply-To:1': 0.27; 'tim': 0.29; "d'aprano": 0.31; 'fine,': 0.31; 'steven': 0.31; 'anyone': 0.31; 'another': 0.32; 'could': 0.34; 'subject:with': 0.35; 'but': 0.35; 'there': 0.35; 'really': 0.36; 'so,': 0.37; 'being': 0.38; 'christian': 0.38; 'e.g.': 0.38; 'to:addr:python-list': 0.38; 'list,': 0.38; 'does': 0.39; 'to:addr:python.org': 0.39; 'mailing': 0.39; 'received:org': 0.40; 'negative': 0.60; 'world.': 0.61; 'stand': 0.64; 'here': 0.66; 'discussion)': 0.84; 'forward.': 0.84; 'odds': 0.84; 'yours': 0.88; 'endorsed': 0.93
X-Injected-Via-Gmane http://gmane.org/
To python-list@python.org
From Mark Lawrence <breamoreboy@yahoo.co.uk>
Subject Re: Slicing with negative strides
Date Tue, 29 Oct 2013 09:34:56 +0000
References <526f45f8$0$6512$c3e8da3$5496439d@news.astraweb.com> <XnsA26858FD6F7E7duncanbooth@127.0.0.1>
Mime-Version 1.0
Content-Type text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding 7bit
X-Gmane-NNTP-Posting-Host host-92-29-185-24.as13285.net
User-Agent Mozilla/5.0 (Windows NT 6.1; rv:24.0) Gecko/20100101 Thunderbird/24.0.1
In-Reply-To <XnsA26858FD6F7E7duncanbooth@127.0.0.1>
X-BeenThere python-list@python.org
X-Mailman-Version 2.1.15
Precedence list
List-Id General discussion list for the Python programming language <python-list.python.org>
List-Unsubscribe <https://mail.python.org/mailman/options/python-list>, <mailto:python-list-request@python.org?subject=unsubscribe>
List-Archive <http://mail.python.org/pipermail/python-list/>
List-Post <mailto:python-list@python.org>
List-Help <mailto:python-list-request@python.org?subject=help>
List-Subscribe <https://mail.python.org/mailman/listinfo/python-list>, <mailto:python-list-request@python.org?subject=subscribe>
Newsgroups comp.lang.python
Message-ID <mailman.1752.1383039312.18130.python-list@python.org> (permalink)
Lines 35
NNTP-Posting-Host 2001:888:2000:d::a6
X-Trace 1383039312 news.xs4all.nl 15878 [2001:888:2000:d::a6]:55313
X-Complaints-To abuse@xs4all.nl
Xref csiph.com comp.lang.python:57897

Show key headers only | 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