Patch #1550800: make exec a function.
diff --git a/Lib/code.py b/Lib/code.py
index b67009b..8d3a884 100644
--- a/Lib/code.py
+++ b/Lib/code.py
@@ -100,7 +100,7 @@
 
         """
         try:
-            exec code in self.locals
+            exec(code, self.locals)
         except SystemExit:
             raise
         except: