[Pyrex] Adding tuple as builtin type

Greg Ewing greg.ewing at canterbury.ac.nz
Wed Feb 11 21:16:19 CET 2009


Claudio Freire wrote:
> Is there a reason why tuple hasn't been added as a builtin type, as list was?

I can't remember all the details, but it's probably
because there are no tuple-specific C API calls that
I could easily make use of. There are only macro
versions with no range checking, and by the time I
generated my own range checking code, there would be
little or no improvement over calling the generic
accessor functions.

Pyrex doesn't currently perform any type-specific
optimisation of unpacking code. If and when it
does, tuple will probably become a known builtin
type as well.

-- 
Greg



More information about the Pyrex mailing list