Path: csiph.com!usenet.pasdenom.info!gegeweb.org!de-l.enfer-du-nord.net!feeder1.enfer-du-nord.net!newsfeed.eweka.nl!eweka.nl!feeder3.eweka.nl!newsfeed.xs4all.nl!newsfeed5.news.xs4all.nl!newsgate.cistron.nl!newsgate.news.xs4all.nl!194.109.133.85.MISMATCH!newsfeed.xs4all.nl!newsfeed6.news.xs4all.nl!xs4all!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; 'python,': 0.02; 'syntax': 0.03; 'string.': 0.04; 'modified': 0.05; 'badly': 0.07; 'method,': 0.07; 'exist.': 0.09; 'it;': 0.09; 'pep': 0.09; 'posting.': 0.09; 'subject:()': 0.09; 'interfaces': 0.15; 'numpy': 0.16; 'subject:array': 0.16; 'example.': 0.17; 'written': 0.20; 'trying': 0.21; 'meant': 0.21; 'demonstrate': 0.23; 'specifically': 0.24; 'header:In-Reply-To:1': 0.25; 'header:User- Agent:1': 0.26; 'piece': 0.29; 'objects': 0.29; 'code': 0.31; 'could': 0.32; 'affects': 0.33; 'values.': 0.33; 'to:addr:python- list': 0.33; 'list': 0.35; 'filter': 0.35; "i'll": 0.36; 'test': 0.36; 'does': 0.37; 'passed': 0.37; 'rather': 0.37; 'subject:: ': 0.38; 'to:addr:python.org': 0.39; 'your': 0.60; 'received:phx3.secureserver.net': 0.62; 'received:prod.phx3.secureserver.net': 0.62; 'mentioned': 0.63; 'show': 0.63; 'apologize': 0.67; 'header:Reply-To:1': 0.68; 'reply-to:no real name:2**0': 0.72; 'ian,': 0.84; 'received:173.201': 0.91; 'received:173.201.192': 0.91; 'tomorrow': 0.96 Date: Fri, 02 Nov 2012 01:57:11 -0700 From: Andrew Robinson User-Agent: Mozilla/5.0 (X11; Linux i686; rv:8.0) Gecko/20111126 Thunderbird/8.0 MIME-Version: 1.0 To: python-list@python.org Subject: Re: Negative array indicies and slice() References: <509053F2.6020900@r3dsolutions.com> <50912ADC.2020401@r3dsolutions.com> <50918716.3080305@r3dsolutions.com> <5092833F.4070609@stoneleaf.us> <50925DE6.7020100@r3dsolutions.com> <50932c9f$0$29967$c3e8da3$5496439d@news.astraweb.com> In-Reply-To: <50932c9f$0$29967$c3e8da3$5496439d@news.astraweb.com> Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: python-list@python.org X-Mailman-Version: 2.1.15 Precedence: list Reply-To: andrew3@r3dsolutions.com 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: 21 NNTP-Posting-Host: 2001:888:2000:d::a6 X-Trace: 1351846745 news.xs4all.nl 6922 [2001:888:2000:d::a6]:40224 X-Complaints-To: abuse@xs4all.nl Xref: csiph.com comp.lang.python:32603 Hi Ian, I apologize for trying your patience with the badly written code example. All objects were meant to be ThirdParty(), the demo was only to show how a slice() filter could have been applied for the reasons PEP357 made index() to exist. eg: because numpy items passed to __getitems__ via slice syntax [::] were illegal values. PEP 357 is the one who specifically mentioned Numpy types -- which is the only reason I used the name in the example; I could have just as well used a string. I am fully aware of what numpy does -- I have used it; modified the fortran interfaces underneath, etc. The index() method, however, affects *all* list objects in Python, not just Numpy's -- correct? I'll write a working piece of code tomorrow to demonstrate the filter very clearly rather than a skeleton, and test it before posting.