mmap as a sequence behavior

Lawrence Oluyede rhymes at myself.com
Thu Jun 29 03:33:43 EDT 2006


Scott David Daniels <scott.daniels at acm.org> 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 - http://www.oluyede.org/blog
"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