Supporting list()
Skip Montanaro
skip at pobox.com
Mon Dec 17 10:51:59 EST 2012
More information about the Python-list mailing list
Mon Dec 17 10:51:59 EST 2012
- Previous message (by thread): Supporting list()
- Next message (by thread): Supporting list()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
> 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
- Previous message (by thread): Supporting list()
- Next message (by thread): Supporting list()
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-list mailing list