[Python-Dev] Memory management in the AST parser & compiler

Greg Ewing greg.ewing at canterbury.ac.nz
Tue Nov 29 23:32:06 CET 2005


Nick Coghlan wrote:

> Declaring that none of the AST node creation methods steal references would be 
> consistent with most of the existing C API (e.g. PySequence_SetItem, 
> PySequence_Tuple, PySequence_List),

Agreed, although the rest of your proposal (while
admirably cunning) requires that ast-building functions
effectively return borrowed references, which is not
usual

Thats' not to say it shouldn't be done, but it does
differ from the usual conventions, and that would need
to be kept in mind.

-- 
Greg Ewing, Computer Science Dept, +--------------------------------------+
University of Canterbury,	   | A citizen of NewZealandCorp, a	  |
Christchurch, New Zealand	   | wholly-owned subsidiary of USA Inc.  |
greg.ewing at canterbury.ac.nz	   +--------------------------------------+


More information about the Python-Dev mailing list