[Python-Dev] [AST] A somewhat less trivial patch than the last one. . .

Nick Coghlan ncoghlan at iinet.net.au
Mon Mar 21 15:50:23 CET 2005


I've put a first cut at generator expressions for the AST branch on Sourceforge. 
It's enough to get test_grammar to pass, and tinkering at the interactive prompt 
appears to work.

The patch also fixes a problem with displaying interim results for functions 
entered at the interactive prompt (I noticed it when trying to get the AST 
branch genexp bytecode to roughly match that produced by Python 2.4). I didn't 
check if classes suffer from the same problem, though.

Finally, the patch fixes asdl_seq_new to avoid allocating large chunks of memory 
when passed a size of zero. (This one bit me when trying to get generator 
expressions to work as arguments - a function call may end up with zero length 
asdl sequences for either the positional or the keyword arguments).

Patch number is 1167628.

Cheers,
Nick.

P.S. Could the powers-that-be add me to the developer list on Sourceforge? I'm 
interested in better access to the SF trackers, rather than CVS access, though.

-- 
Nick Coghlan   |   ncoghlan at email.com   |   Brisbane, Australia
---------------------------------------------------------------
             http://boredomandlaziness.skystorm.net


More information about the Python-Dev mailing list