comparison genshi/template/markup.py @ 813:3047d5d83ccc

Merge the internal template filters `_eval` and `_exec` into the `_flatten` function for slightly better performance.
author cmlenz
date Mon, 09 Mar 2009 13:26:01 +0000
parents 92c5d936616b
children ecd7ad13bdaf
comparison
equal deleted inserted replaced
811:b1e9e3209c6f 813:3047d5d83ccc
372 vars = dict(select=select) 372 vars = dict(select=select)
373 373
374 # Recursively process the output 374 # Recursively process the output
375 template = _apply_directives(template, directives, ctxt, 375 template = _apply_directives(template, directives, ctxt,
376 **vars) 376 **vars)
377 for event in self._match( 377 for event in self._match(self._flatten(template, ctxt,
378 self._exec( 378 **vars),
379 self._eval( 379 ctxt, start=idx + 1, **vars):
380 self._flatten(template, ctxt, **vars),
381 ctxt, **vars),
382 ctxt, **vars),
383 ctxt, start=idx + 1, **vars):
384 yield event 380 yield event
385 381
386 # If the match template did not actually call select to 382 # If the match template did not actually call select to
387 # consume the matched stream, the original events need to 383 # consume the matched stream, the original events need to
388 # be consumed here or they'll get appended to the output 384 # be consumed here or they'll get appended to the output
Copyright (C) 2012-2017 Edgewall Software