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: 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 Subject: Re: Slicing with negative strides Date: Tue, 29 Oct 2013 09:34:56 +0000 References: <526f45f8$0$6512$c3e8da3$5496439d@news.astraweb.com> 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: X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list List-Id: General discussion list for the Python programming language List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Newsgroups: comp.lang.python Message-ID: 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 On 29/10/2013 08:53, 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. > >> >> >> 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