Commits

Amaury Forgeot d'Arc  committed 5bc5ca1

Fix error message: exec() is a function now.

  • Participants
  • Parent commits c9fad5f
  • Branches py3k

Comments (0)

Files changed (1)

File pypy/interpreter/pyopcode.py

 
         if not isinstance(globals, dict):
             raise TypeError(
-                "exec: arg 2 must be a dictionary or None, not %s" %
+                "exec() arg 2 must be a dictionary or None, not %s" %
                 type(globals).__name__)
         globals.setdefault('__builtins__', builtin)
         if not isinstance(locals, dict):
             if not hasattr(locals, '__getitem__'):
                 raise TypeError(
-                    "exec: arg 3 must be a mapping or None, not %s" %
+                    "exec() arg 3 must be a mapping or None, not %s" %
                     type(locals.__name__))
 
         if not isinstance(prog, codetype):
             filename = '<string>'
             if not isinstance(prog, (str, bytes)):
-                raise TypeError("exec: arg 1 must be a string, bytes, "
+                raise TypeError("exec() arg 1 must be a string, bytes, "
                                 "or code object")
             prog = compile(prog, filename, 'exec', compile_flags, 1)
         return (prog, globals, locals)