changeset 350:4a2050e9dcd8 experimental-inline

inline branch: Reverted accidential check-in [429].
author cmlenz
date Fri, 10 Nov 2006 18:39:07 +0000
parents 0b3e382325ef
children 94639584725a
files genshi/template/core.py
diffstat 1 files changed, 1 insertions(+), 14 deletions(-) [+]
line wrap: on
line diff
--- a/genshi/template/core.py
+++ b/genshi/template/core.py
@@ -178,11 +178,6 @@
             expr = ' "%s"' % self.expr.source
         return '<%s%s>' % (self.__class__.__name__, expr)
 
-    def optimize(self, stream, directives):
-        if not directives:
-            return stream
-        return directives[0].optimize(stream, directives[1:])
-
     def tagname(self):
         """Return the local tag name of the directive as it is used in
         templates.
@@ -236,7 +231,7 @@
 
         self.filters = [self._flatten, self._eval]
 
-        self.stream = self._optimize(self._parse(encoding))
+        self.stream = self._parse(encoding)
 
     def __repr__(self):
         return '<%s "%s">' % (self.__class__.__name__, self.filename)
@@ -294,14 +289,6 @@
         return _interpolate(text, [cls._FULL_EXPR_RE, cls._SHORT_EXPR_RE])
     _interpolate = classmethod(_interpolate)
 
-    def _optimize(self, stream):
-        for kind, data, pos in stream:
-            if kind is SUB:
-                directives, substream = data
-                directives[0].optimize(substream, directives[1:])
-            else:
-                yield kind, data pos
-
     def compile(self):
         """Compile the template to a Python module, and return the module
         object.
Copyright (C) 2012-2017 Edgewall Software