[Python-Dev] Store x Load x --> DupStore
Phillip J. Eby
pje at telecommunity.com
Mon Feb 21 04:41:09 CET 2005
At 04:32 PM 2/21/05 +1300, Greg Ewing wrote:
>Phillip J. Eby wrote:
>>Hm, actually I think I see the answer; in the case of module-level code
>>there can be no "anonymous local variables" the way there can in functions.
>Why not? There's still a frame object associated with the call
>of the anonymous function holding the module's top-level code.
>The compiler can allocate locals in that frame, even if the
>user's code can't.
That's a good point, but if you look at my "eliminating the block stack"
post, you'll see that there's a simpler way to potentially get rid of the
block stack, where "simpler" means "simpler changes in fewer places".
More information about the Python-Dev