Re: Adding tuple as builtin type
Greg Ewing <[email protected]> Thu, 12 Feb 2009 09:16:19 +1300
| Newsgroups | gmane.comp.python.pyrex |
|---|---|
| Message-ID | <[email protected]> |
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