Skip to content
Myr

added disclaimer to rwbench and fixed error reporting for one of the four Output cases

Before adoption: this commit came in with the history the project adopted, so no landing records it.

--HG-- branch : trunk

authored by Armin Ronacher · committed by Armin Ronacher · parent 5d2733f · Browse files · 2 files+8 added−6 removed
This commit

State

Before adoption: this commit came in with the history the project adopted, so no landing records it.

Diff stats

2 files+8 added−6 removed

  • other:+8 added−6 removed

2 files+8 added−6 removed

modified:examples/rwbench/rwbench.py+3 added-1 removed
1 unmodified line
2"""3 RealWorldish Benchmark4 ~~~~~~~~~~~~~~~~~~~~~~56 A more real-world benchmark of Jinja2.6 A more real-world benchmark of Jinja2. Like the other benchmark in the7 Jinja2 repository this has no real-world usefulnes (despite the name).8 Just go away and ignore it. NOW!910 :copyright: Copyright 2008 by Armin Ronacher.11 :license: BSD.12"""
73 unmodified lines
modified:jinja2/compiler.py+5 added-5 removed
532 unmodified lines
533 static_subscribes.sort(key=lambda x: type(x[0].node)534 is nodes.Subscript)535 for node, count in static_subscribes:536 ident = self.temporary_identifier()537 self.writeline(ident + ' = ')537 self.writeline(ident + ' = ', node)538 self.visit(node, frame)539 frame.overlays[node] = (ident, count)540541 def pull_dependencies(self, nodes):
13 unmodified lines
555 """This function returns all the shadowed variables in a dict556 in the form name: alias and will write the required assignments557 into the current scope. No indentation takes place.558 """559 # make sure we "backup" overridden, local identifiers560 # TODO: we should probably optimize this and check if the561 # identifier is in use afterwards.559 aliases = {}560 for name in frame.identifiers.find_shadowed():561 aliases[name] = ident = self.temporary_identifier()562 self.writeline('%s = l_%s' % (ident, name))
623 unmodified lines
1186 else:1187 self.writeline('%s.append(' % frame.buffer)1188 self.write(repr(concat(format)) + ' % (')1189 idx = -11190 self.indent()1191 for argument in arguments:1192 self.newline()1193 close = 01194 if self.environment.autoescape:1195 self.write('escape(')1196 close += 1
1 unmodified line
1198 self.write('environment.finalize(')1199 close += 11200 self.visit(argument, frame)1201 self.write(')' * close + ', ')1203 self.write(')')1202 self.outdent()1203 self.writeline(')')1204 if frame.buffer is not None:1205 self.write(')')12061207 if outdent_later:
239 unmodified lines