This is because some hackers have been removed from Python 3.
The new documentation on the exec() function has some notes about this, but does not fully explain the situation.
Python 2, after seeing the exec statement, change each access to vars and functions in LOAD_NAME instead of LOAD_FAST or LOAD_GLOBAL.
Check out my other answer about this here .
Jbernardo
source share