2 comments

[ 2.7 ms ] story [ 17.2 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.