Path: csiph.com!usenet.pasdenom.info!weretis.net!feeder1.news.weretis.net!feeder.erje.net!eu.feeder.erje.net!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!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.004 X-Spam-Evidence: '*H*': 0.99; '*S*': 0.00; 'skip:` 10': 0.05; 'executed': 0.07; 'wrapped': 0.07; 'posting.': 0.09; 'subject:()': 0.09; 'to:addr:comp.lang.python': 0.09; 'cc:addr:python-list': 0.10; 'thread': 0.11; '[2,': 0.16; 'apology': 0.16; 'gmail.': 0.16; 'oct': 0.16; 'python-list,': 0.16; 'subject:array': 0.16; 'mon,': 0.16; 'wrote:': 0.17; 'skip:` 20': 0.17; 'monday,': 0.23; 'cc:2**1': 0.24; 'cc:addr:python.org': 0.25; 'header:In-Reply- To:1': 0.25; 'header:User-Agent:1': 0.26; '---': 0.26; 'appreciated.': 0.26; 'am,': 0.27; 'cc:addr:gmail.com': 0.27; 'andrew': 0.27; 'all.': 0.28; 'chris': 0.28; 'post': 0.28; '>>>>': 0.29; 'class': 0.29; 'seconds': 0.30; 'code': 0.31; 'received:google.com': 0.34; 'recieve': 0.35; 'expected': 0.35; 'pm,': 0.35; 'received:209.85.220': 0.35; 'received:209.85': 0.35; 'but': 0.36; 'cc:no real name:2**1': 0.36; "didn't": 0.36; 'october': 0.37; 'received:209': 0.37; 'subject:: ': 0.38; 'brief': 0.38; 'from:no real name:2**0': 0.60; 'link': 0.60; 'note:': 0.64; 'saw': 0.75; '*****': 0.84; 'e-mails,': 0.84; 'post;': 0.84; 'mistake': 0.91 Newsgroups: comp.lang.python Date: Mon, 29 Oct 2012 01:59:06 -0700 (PDT) In-Reply-To: Complaints-To: groups-abuse@google.com Injection-Info: glegroupsg2000goo.googlegroups.com; posting-host=207.55.87.38; posting-account=PPUdCwoAAABL5SHTC0kNfTVCKKHjc2Wa References: <6998a955-7b34-4f4f-b8d6-62d1028f7561@googlegroups.com> <0215c39b-47f3-46c5-9173-598f0136a881@g7g2000pbi.googlegroups.com> User-Agent: G2/1.0 X-Google-Web-Client: true X-Google-IP: 207.55.87.38 MIME-Version: 1.0 Subject: Re: Negative array indicies and slice() From: andrewr3mail@gmail.com To: comp.lang.python@googlegroups.com Content-Type: text/plain; charset=ISO-8859-1 Cc: python-list@python.org, andrewr3mail@gmail.com 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: , Message-ID: Lines: 47 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1351501155 news.xs4all.nl 6904 [2001:888:2000:d::a6]:46517 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:32353 On Monday, October 29, 2012 1:38:04 AM UTC-7, Chris Rebert wrote: > On Mon, Oct 29, 2012 at 1:24 AM, > > > On Sunday, October 28, 2012 9:44:56 PM UTC-7, alex23 wrote: > > >> On Oct 29, 2:09 pm, Andrew < wrote: > > You never wrapped `a` in a RangedSlicer or otherwise made use of RangedSlicer! > > You wanted: > > a = RangedSlicer([1,2,3,4,5]) > > > > >>>> a.__getitem__( slice(1,5) ) > > > [2, 3, 4, 5] > > > > > > Very odd... I would have expected [1,2,3,4] > > > > "[2, 3, 4, 5]" is the return value from `a.__getitem__( slice(1,5) )` > > (or, equivalently, from `[1,2,3,4,5][1:5]`). It is not the result of > > "print item"; that line of code is never executed since you never used > > the RangedSlicer class at all. > > > > Regards, > > Chris My apology --- I deleted that post; yet it didn't delete... I saw my mistake seconds after posting. ***** gmail. Note: I subscribed to the python-list, and am able to recieve e-mails, but I don't see how to write a post for this particular thread nor subscribe to this particular thread... A brief suggestion, or link to a howto would be *much* appreciated.