aboutsummaryrefslogtreecommitdiffstats
path: root/mako/compat.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2012-11-11 15:57:28 -0500
committerMike Bayer <mike_mp@zzzcomputing.com>2012-11-11 15:57:28 -0500
commit15015ce8bedaa4953e094353d9c3cd4c8b3cad14 (patch)
tree89df9610762d55a59633aa0ca319d29663e1724a /mako/compat.py
parent0e82d0c39d08f4f2885ea21db82f8845f42261be (diff)
downloadexternal_python_mako-15015ce8bedaa4953e094353d9c3cd4c8b3cad14.tar.gz
external_python_mako-15015ce8bedaa4953e094353d9c3cd4c8b3cad14.tar.bz2
external_python_mako-15015ce8bedaa4953e094353d9c3cd4c8b3cad14.zip
I'm seeing exec() as a function having the same behavior here from 2.4 to 3.3.
waiting on further detail what I'm missing here
Diffstat (limited to 'mako/compat.py')
-rw-r--r--mako/compat.py30
1 files changed, 0 insertions, 30 deletions
diff --git a/mako/compat.py b/mako/compat.py
index c53091d..2dba143 100644
--- a/mako/compat.py
+++ b/mako/compat.py
@@ -126,36 +126,6 @@ if py3kwarning:
else:
callable = callable
-################################################
-# cross-compatible exec_()
-# Copyright (c) 2010-2012 Benjamin Peterson
-if py3k:
- import builtins
- exec_ = getattr(builtins, "exec")
-
-
- def reraise(tp, value, tb=None):
- if value.__traceback__ is not tb:
- raise value.with_traceback(tb)
- raise value
-
-
- print_ = getattr(builtins, "print")
- del builtins
-
-else:
- def exec_(code, globs=None, locs=None):
- """Execute code in a namespace."""
- if globs is None:
- frame = sys._getframe(1)
- globs = frame.f_globals
- if locs is None:
- locs = frame.f_locals
- del frame
- elif locs is None:
- locs = globs
- exec("""exec code in globs, locs""")
-################################################
################################################
# cross-compatible metaclass implementation