diff Lib/code.py @ 39782:c94f37054f19

Patch #1550800: make exec a function.
author Georg Brandl <georg@python.org>
date Wed, 06 Sep 2006 06:51:57 +0000
parents 081b4f0e81b7
children 4cdf21a0dbbc
line wrap: on
line diff
--- a/Lib/code.py	Thu Aug 31 21:45:56 2006 +0000
+++ b/Lib/code.py	Wed Sep 06 06:51:57 2006 +0000
@@ -100,7 +100,7 @@
 
         """
         try:
-            exec code in self.locals
+            exec(code, self.locals)
         except SystemExit:
             raise
         except: