[issue26825] Variable defined in exec(code) unreachable inside function call with visible name in dir() results

Xiang Zhang report at bugs.python.org
Fri Apr 22 04:43:12 EDT 2016


Xiang Zhang added the comment:

This seems to a behaviour change. In 2.7, return ans compiles to LOAD_NAME so it can find ans. But in 3.x, it compiles to LOAD_GLOBAL which searches ans from global scope. I don't know when this change is introduced.

----------
components: +Interpreter Core -Argument Clinic
nosy: +xiang.zhang -324857679
type: crash -> behavior

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue26825>
_______________________________________


More information about the Python-bugs-list mailing list