[AST] A somewhat less trivial patch than the last one. . .
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@email.com | Brisbane, Australia --------------------------------------------------------------- http://boredomandlaziness.skystorm.net
Nick Coghlan wrote:
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.
I'm going to be out of the country until late next week, so if the folks sprinting on the AST branch at PyCon want to incorporate this (or parts of it), please go ahead. I'll be interested in seeing the results of the sprint when I get back. With any luck, generator expressions and decorators will both be available in a clean checkout :) Cheers, Nick. -- Nick Coghlan | ncoghlan@email.com | Brisbane, Australia --------------------------------------------------------------- http://boredomandlaziness.skystorm.net
participants (1)
-
Nick Coghlan