aboutsummaryrefslogtreecommitdiffstats
path: root/lib/mako/codegen.py
diff options
context:
space:
mode:
authorMike Bayer <mike_mp@zzzcomputing.com>2006-12-31 22:25:43 +0000
committerMike Bayer <mike_mp@zzzcomputing.com>2006-12-31 22:25:43 +0000
commit7913cd6bd488103b4014e341b22b6b1cc54f69d3 (patch)
tree41fa59911ccab7a5d2bd0a8f5756134b057840bf /lib/mako/codegen.py
parentbebec37390745418090b759adc8fc1afd0ff1d01 (diff)
downloadexternal_python_mako-7913cd6bd488103b4014e341b22b6b1cc54f69d3.tar.gz
external_python_mako-7913cd6bd488103b4014e341b22b6b1cc54f69d3.tar.bz2
external_python_mako-7913cd6bd488103b4014e341b22b6b1cc54f69d3.zip
further try/except AST fixes, cleanup of filter unit tests, made __locals propigation in codegen slightly simpler/faster
Diffstat (limited to 'lib/mako/codegen.py')
-rw-r--r--lib/mako/codegen.py2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/mako/codegen.py b/lib/mako/codegen.py
index ea86ea1..f4f5350 100644
--- a/lib/mako/codegen.py
+++ b/lib/mako/codegen.py
@@ -423,7 +423,7 @@ class _GenerateRenderMethod(object):
if not self.in_def and len(self.identifiers.locally_assigned) > 0:
# if we are the "template" def, fudge locally declared/modified variables into the "__locals" dictionary,
# which is used for def calls within the same template, to simulate "enclosing scope"
- self.printer.writeline('__locals.update(dict([(k, v) for k, v in locals().iteritems() if k in [%s]]))' % ','.join([repr(x) for x in node.declared_identifiers()]))
+ self.printer.writeline('__locals.update(dict([(k, locals()[k]) for k in [%s]]))' % ','.join([repr(x) for x in node.declared_identifiers()]))
def visitIncludeTag(self, node):
self.write_source_comment(node)