Merge pull request #2017 from jrobeson/py3-compat-exec

use exec() in a python3 compatible way
This commit is contained in:
Adrian Sampson 2016-05-27 00:09:45 -07:00
commit a97c9b8c3c

View file

@ -134,7 +134,7 @@ def compile_func(arg_names, statements, name='_the_func', debug=False):
dis.dis(const)
the_locals = {}
exec prog in {}, the_locals
exec(prog, {}, the_locals)
return the_locals[name]