2 comments

[ 2.0 ms ] story [ 18.6 ms ] thread
Note also that the behavior changed in Python 3: exec is now a function, and changes to locals made through exec won't show up in the original scope.
Thanks -- I updated the post with a note about Py3k.