Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > comp.lang.python > #34982 > unrolled thread
| Started by | Skip Montanaro <skip@pobox.com> |
|---|---|
| First post | 2012-12-17 15:51 +0000 |
| Last post | 2012-12-17 15:51 +0000 |
| Articles | 1 — 1 participant |
Back to article view | Back to comp.lang.python
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: Supporting list() Skip Montanaro <skip@pobox.com> - 2012-12-17 15:51 +0000
| From | Skip Montanaro <skip@pobox.com> |
|---|---|
| Date | 2012-12-17 15:51 +0000 |
| Subject | Re: Supporting list() |
| Message-ID | <mailman.963.1355759540.29569.python-list@python.org> |
> If using __getitem__ it needs to work with integers from 0 to len(f)-1, > and raise IndexError for len(f), len(f+1), etc. Ah, thanks. I have a __getitem__ method, but it currently doesn't raise IndexError. (I'm indexing into a ring buffer, and the usage of the class pretty much precludes indexing with an out-of-bounds index.) S
Back to top | Article view | comp.lang.python
csiph-web