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 <rep...@bugs.python.org>
<http://bugs.python.org/issue26825>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to