Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #32603
| Date | 2012-11-02 01:57 -0700 |
|---|---|
| From | Andrew Robinson <andrew3@r3dsolutions.com> |
| Subject | Re: Negative array indicies and slice() |
| References | (5 earlier) <5092833F.4070609@stoneleaf.us> <50925DE6.7020100@r3dsolutions.com> <CALwzidkf6yaPz3C9qUtsUe-a+ojmpJNY0FxhBiykZmm6VssYTQ@mail.gmail.com> <mailman.3170.1351808865.27098.python-list@python.org> <50932c9f$0$29967$c3e8da3$5496439d@news.astraweb.com> |
| Newsgroups | comp.lang.python |
| Message-ID | <mailman.3185.1351846745.27098.python-list@python.org> (permalink) |
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.
Back to comp.lang.python | Previous | Next — Previous in thread | Next in thread | Find similar | Unroll thread
Re: Negative array indicies and slice() Andrew Robinson <andrew3@r3dsolutions.com> - 2012-11-01 15:25 -0700
Re: Negative array indicies and slice() Steven D'Aprano <steve+comp.lang.python@pearwood.info> - 2012-11-02 02:14 +0000
Re: Negative array indicies and slice() Andrew Robinson <andrew3@r3dsolutions.com> - 2012-11-02 01:57 -0700
Re: Negative array indicies and slice() Robert Kern <robert.kern@gmail.com> - 2012-11-02 10:48 +0000
csiph-web