mmap as a sequence behavior

Lawrence Oluyede rhymes at
Thu Jun 29 09:33:43 CEST 2006

Scott David Daniels <scott.daniels at> wrote:

> That is sequence behavior.  The convention of -1 for last, -2 for 
> second-to-last, ... is done before it gets to your C code.  I suspect
> if you don't define a __len__ method, you'd suppress this.

I defined a __len__ method but I get the index "plain" without any kind
of conversion before entering the method

Lawrence -
"Nothing is more dangerous than an idea
if it's the only one you have" - E. A. Chartier

More information about the Python-list mailing list