Mercurial > genshi > genshi-test
comparison markup/template.py @ 93:f648152df7fd
Minor bugfi x follow-up to [97]: don't yield the terminator event from the whitespace filter.
author | cmlenz |
---|---|
date | Thu, 20 Jul 2006 23:33:51 +0000 |
parents | 3b75c6730b29 |
children | 7d6426183a90 |
comparison
equal
deleted
inserted
replaced
92:3b75c6730b29 | 93:f648152df7fd |
---|---|
364 Directive.__init__(self, value, filename, lineno, offset) | 364 Directive.__init__(self, value, filename, lineno, offset) |
365 | 365 |
366 def __call__(self, stream, ctxt, directives): | 366 def __call__(self, stream, ctxt, directives): |
367 iterable = self.expr.evaluate(ctxt) | 367 iterable = self.expr.evaluate(ctxt) |
368 if iterable is not None: | 368 if iterable is not None: |
369 scope = {} | |
369 stream = list(stream) | 370 stream = list(stream) |
370 scope = {} | |
371 targets = self.targets | 371 targets = self.targets |
372 for item in iter(iterable): | 372 for item in iter(iterable): |
373 if len(targets) == 1: | 373 if len(targets) == 1: |
374 scope[targets[0]] = item | 374 scope[targets[0]] = item |
375 else: | 375 else: |