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.
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)
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()
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(')
close += 1
self.visit(argument, frame)
self.write(')' * close + ', ')
- self.write(')')
+ self.outdent()
+ self.writeline(')')
if frame.buffer is not None:
self.write(')')