added disclaimer to rwbench and fixed error reporting for one of the four Output cases
--HG--
branch : trunk
diff --git a/examples/rwbench/rwbench.py b/examples/rwbench/rwbench.py
index ccd144f..2406de2 100644
--- a/examples/rwbench/rwbench.py
+++ b/examples/rwbench/rwbench.py
@@ -3,7 +3,9 @@
RealWorldish Benchmark
~~~~~~~~~~~~~~~~~~~~~~
- A more real-world benchmark of Jinja2.
+ A more real-world benchmark of Jinja2. Like the other benchmark in the
+ Jinja2 repository this has no real-world usefulnes (despite the name).
+ Just go away and ignore it. NOW!
:copyright: Copyright 2008 by Armin Ronacher.
:license: BSD.
diff --git a/jinja2/compiler.py b/jinja2/compiler.py
index 0b8ae96..9f99045 100644
--- a/jinja2/compiler.py
+++ b/jinja2/compiler.py
@@ -534,7 +534,7 @@
is nodes.Subscript)
for node, count in static_subscribes:
ident = self.temporary_identifier()
- self.writeline(ident + ' = ')
+ self.writeline(ident + ' = ', node)
self.visit(node, frame)
frame.overlays[node] = (ident, count)
@@ -556,9 +556,6 @@
in the form name: alias and will write the required assignments
into the current scope. No indentation takes place.
"""
- # make sure we "backup" overridden, local identifiers
- # TODO: we should probably optimize this and check if the
- # identifier is in use afterwards.
aliases = {}
for name in frame.identifiers.find_shadowed():
aliases[name] = ident = self.temporary_identifier()
@@ -1190,7 +1187,9 @@
self.writeline('%s.append(' % frame.buffer)
self.write(repr(concat(format)) + ' % (')
idx = -1
+ self.indent()
for argument in arguments:
+ self.newline()
close = 0
if self.environment.autoescape:
self.write('escape(')
@@ -1200,7 +1199,8 @@
close += 1
self.visit(argument, frame)
self.write(')' * close + ', ')
- self.write(')')
+ self.outdent()
+ self.writeline(')')
if frame.buffer is not None:
self.write(')')