[Python-Dev] LOAD_SELF and SELF_ATTR opcodes

Tim Delaney tcdelaney at optusnet.com.au
Sat Oct 15 22:24:30 CEST 2005


Tim Delaney wrote:

> that also binds all attribute accesses all the way down into a single
> constant call e.g.
>
>    LOAD_FAST  0
>    LOAD_ATTR  'a'
>    LOAD_ATTR  'b'
>    LOAD_ATTR  'c'
>    LOAD_ATTR  'd'
>
> is bound to a single constant:
>
>    LOAD_CONST  5

D'oh. I'm a moron - of course it can't do that. It'll do it for LOAD_GLOBAL 
followed by multiple LOAD_ATTR, and (I think) also for LOAD_NAME.

Tim Delaney 



More information about the Python-Dev mailing list