[Python-3000] List & set comprehensions patch (original) (raw)

Greg Ewing greg.ewing at canterbury.ac.nz
Wed Mar 7 22:50:38 CET 2007


Nick Coghlan wrote:

One of the comments made on Georg's initial attempt at implementing these features was that it would be nice to avoid the function call overhead in the listcomp & setcomp case ... I tried to do that and essentially failed outright

Not having seen the code, my thought would be to temporarily change the symtab entry so that it refers to a different locals slot, compile the nested code with that, and then change it back again.

Did you consider doing something like that and find that it wouldn't work?

-- Greg



More information about the Python-3000 mailing list