[Python-Dev] accumulator display syntax
Tim Peters
tim.one at comcast.net
Tue Oct 21 16:55:01 EDT 2003
More information about the Python-Dev mailing list
Tue Oct 21 16:55:01 EDT 2003
- Previous message: [Python-Dev] accumulator display syntax
- Next message: [Python-Dev] accumulator display syntax
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
[Guido] > ... > BTW, while Alex has shown that a generator function with no free > variables runs quite fast, a generator expression that uses variables > from the surrounding scope will have to use the nested scopes > machinery to access those, unlike a list comprehension; not only does > this run slower, but it also slows down all other uses of that > variable in the surrounding scope (because it becomes a "cell" > throughout the scope). The implementation could synthesize a generator function abusing default arguments to give the generator's frame locals with the same names.
- Previous message: [Python-Dev] accumulator display syntax
- Next message: [Python-Dev] accumulator display syntax
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list