diff markup/template.py @ 6:5da45906dda7

Simplified implementation of `py:content` directive.
author cmlenz
date Sun, 04 Jun 2006 10:46:14 +0000
parents 1add946decb8
children c5890ef863ba
line wrap: on
line diff
--- a/markup/template.py
+++ b/markup/template.py
@@ -242,11 +242,10 @@
         if kind is Stream.START:
             yield kind, data, pos # emit start tag
         yield Stream.EXPR, self.expr, pos
-        previous = None
-        try:
-            while True:
-                previous = stream.next()
-        except StopIteration:
+        previous = stream.next()
+        for event in stream:
+            previous = event
+        else:
             if previous is not None:
                 yield previous
 
Copyright (C) 2012-2017 Edgewall Software