On Thu, Sep 20, 2012 at 10:15 PM, Peter Otten <__pete...@web.de> wrote: > >>>> loc = {} >>>> exec("x = 1; y = 2", globals(), loc) >>>> loc > {'y': 2, 'x': 1} > > However, this won't work with the code object taken from a function which > uses a different a bytecode (STORE_FAST instead of STORE_NAME): >
Is there any way to use STORE_FAST instead of STORE_NAME? exec("string", ...) is not a solution for me. # What is different between fn.func_code and compile("string")? -- regards, makoto kuwata -- http://mail.python.org/mailman/listinfo/python-list