projects
/
jinja2.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
4ef9234
)
Tiny improvement for the loop hack. Implemented it in a way that the
author
Armin Ronacher
<armin.ronacher@active-4.com>
Sun, 13 Sep 2009 22:56:58 +0000
(15:56 -0700)
committer
Armin Ronacher
<armin.ronacher@active-4.com>
Sun, 13 Sep 2009 22:56:58 +0000
(15:56 -0700)
frame is not modified in the macro body generator.
--HG--
branch : trunk
jinja2/compiler.py
patch
|
blob
|
history
diff --git
a/jinja2/compiler.py
b/jinja2/compiler.py
index 51790037d8e7714f9372d8da68ad6ce37ab42289..fa79f0ba0a586b091ded67c75352c36687e6bbbf 100644
(file)
--- a/
jinja2/compiler.py
+++ b/
jinja2/compiler.py
@@
-655,7
+655,7
@@
class CodeGenerator(NodeVisitor):
# leaking into a new python frame and might be used both unassigned
# and assigned.
if 'loop' in frame.identifiers.declared:
- args
.append('l_loop=l_loop')
+ args
= args + ['l_loop=l_loop']
self.writeline('def macro(%s):' % ', '.join(args), node)
self.indent()
self.buffer(frame)