Skip to content
Myr

[svn] removed debug print, small changes in context

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 de478f6 · Browse files · 3 files+7 added−11 removed
This commit

State

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

Diff stats

3 files+7 added−11 removed

  • tests:+1 added−0 removed
  • other:+6 added−11 removed

3 files+7 added−11 removed

modified:jinja/translators/python.py-1 removed
113 unmodified lines
114115 def process(environment, node):116 translator = PythonTranslator(environment, node)117 source = translator.translate()118 print source118 ns = {}119 exec source in ns120 return Template(environment, ns['generate'])121 process = staticmethod(process)
519 unmodified lines
modified:jinja/datastructure.py+6 added-10 removed
80 unmodified lines
81 """82 Dict like object.83 """8485 def __init__(*args, **kwargs):86 try:87 self = args[0]88 self.environment = args[1]89 initial = dict(*args[2:], **kwargs)90 except:91 raise TypeError('%r requires environment as first argument. '92 'The rest of the arguments are forwarded to '93 'the default dict constructor.')94 self._stack = [self.environment.globals, initial, {}]85 def __init__(self, _environment_, *args, **kwargs):86 self.environment = _environment_87 self._stack = [self.environment.globals, dict(*args, **kwargs), {}]88 self.globals, _, self.current = self._stack8990 def pop(self):91 if len(self._stack) <= 2:
81 unmodified lines
173 for idx, item in enumerate(s['seq']):174 s['index'] = idx175 yield item176177 def __len__(self):178 return self._stack[-1]['length']179180 def __call__(self, seq):181 if self.loop_function is not None:182 return self.loop_function(seq)183 return Undefined
83 unmodified lines
modified:tests/bigtable.py+1 added
1# -*- coding: utf-8 -*_2# Template language benchmarks3#4# Objective: Generate a 1000x10 HTML table as fast as possible.5# adapted for jinja 1
129 unmodified lines