Changing an AST

Fredrik Lundh fredrik at pythonware.com
Mon Oct 10 12:31:23 EDT 2005


"beza1e1" wrote:

> Thank you! this "compile/exec in context" is the thing i wanted.
>
> It is not that performant i think.

it's about as fast as it can get, as long as you only call compile when
the expressions change.   (the example didn't show it, but the "expr"
code object can of course be reused with different contexts)

</F>






More information about the Python-list mailing list