[issue21591] "exec(a, b, c)" not the same as "exec a in b, c" in nested functions
Neil Muller
report at bugs.python.org
Tue Jul 22 23:25:41 CEST 2014
Neil Muller added the comment:
Poking at the source of the error suggests the problem is in symtable.c:
The offending logic looks to be (around line 1124 in python 2.7 at revision 91767:4cef7b0ec659):
if (s->v.Exec.globals) {
...
}
else
{
st->st_cur->ste_unoptimized |= OPT_BARE_EXEC;
}
since OPT_BARE_EXEC is the flag that triggers the exception.
As far as I can see, this makes no provision for the exec() case, and only avoids setting OPT_BARE_EXEC if globals is specified using the old syntax.
----------
nosy: +Neil Muller
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue21591>
_______________________________________
More information about the Python-bugs-list
mailing list