Technically, in Python, your class implements a sequence, not a list.
(A list is a particular kind of sequence whose implementation is done
entirely in C.)
To call e.g. the getitem function of an arbitrary sequence, you have
to call x->ob_type->tp_as_sequence->sq_item(x, i), checking each
pointer (except ob_type) for being non-NULL before dereferencing it.
I agree that there should be a standard C interface to each of the
sequence operations (and to each of the mapping operations). Donald
Beaudry has written such code, all it needs is conversion to the
standard naming scheme (it's in Donald's todo list :-).
--Guido van Rossum, CWI, Amsterdam <mailto:Guido.van.Rossum@cwi.nl>
<http://www.cwi.nl/cwi/people/Guido.van.Rossum.html>