Re: Python bytecode STORE_NAME

2008-11-19 Thread Peter Otten
[EMAIL PROTECTED] wrote: > On 19 Nov., 10:14, Peter Otten <[EMAIL PROTECTED]> wrote: >> >> Every code object has its own co_names attribute (a tuple). The arguments >> are offsets into that tuple. >> >> Using Python 2.5 I can't reproduce your example, I get 0 offsets in both >> cases. Here's a sim

Re: Python bytecode STORE_NAME

2008-11-19 Thread schwarz
On 19 Nov., 10:14, Peter Otten <[EMAIL PROTECTED]> wrote: > > Every code object has its own co_names attribute (a tuple). The arguments > are offsets into that tuple. > > Using Python 2.5 I can't reproduce your example, I get 0 offsets in both > cases. Here's a simpler one: > > >>> import dis > >>>

Re: Python bytecode STORE_NAME

2008-11-19 Thread Peter Otten
[EMAIL PROTECTED] wrote: > As part of some research I am doing a Python Virtual Machine in Java, > and the exact semantics of the STORE_NAME bytecode is unclear to be, > so I was hoping somebody here could clarify it. > The STORE_NAME bytecode is supposed to set a value for a name in the > current

Python bytecode STORE_NAME

2008-11-18 Thread schwarz
As part of some research I am doing a Python Virtual Machine in Java, and the exact semantics of the STORE_NAME bytecode is unclear to be, so I was hoping somebody here could clarify it. The STORE_NAME bytecode is supposed to set a value for a name in the current scope. However, the following piece