[Pyrex] [Cython-dev] Optimizing use of lists

Greg Ewing greg.ewing at canterbury.ac.nz
Tue Nov 27 00:59:32 CET 2007


Robert Bradshaw wrote:
> Great. I haven't started on this yet, so we should make sure to make  
> things compatible.

I haven't thought it through in detail yet, but the
plan is to pre-declare the main builtin types such as
object, list, dict, tuple, etc. as though they were
extension types, with appropriate methods.

I'll probably have to create a new kind of method so
that things like some_list.append(foo) can be translated
into a call to PyList_Append. Something like a non-
virtual C method.

Something similar will also have to be done for type
slots, so that some_list[i] can be translated into
PyList_GetItem, etc.

--
Greg



More information about the Pyrex mailing list