[Zpt] CVS: Packages/TAL - TALInterpreter.py:1.20

guido@digicool.com guido@digicool.com
Fri, 16 Mar 2001 12:53:10 -0500 (EST)


Update of /cvs-repository/Packages/TAL
In directory korak:/tmp/cvs-serv1531

Modified Files:
	TALInterpreter.py 
Log Message:
Refactor the commonality between do_startTag and do_startEndTag.

Remove the do_text() method, this instruction is no longer used.



--- Updated File TALInterpreter.py in package Packages/TAL --
--- TALInterpreter.py	2001/03/16 15:51:48	1.19
+++ TALInterpreter.py	2001/03/16 17:53:09	1.20
@@ -169,9 +169,12 @@
             self.do_startTag(name, attrList)
             self.do_endTag(name)
         else:
-            self.do_startTag(name, attrList, self.endsep)
+            self.startTagCommon(name, attrList, self.endsep)
 
-    def do_startTag(self, name, attrList, end=">"):
+    def do_startTag(self, name, attrList):
+        self.startTagCommon(name, attrList, ">")
+
+    def startTagCommon(self, name, attrList, end):
         if not attrList:
             self.stream_write("<%s%s" % (name, end))
             return
@@ -259,10 +262,6 @@
         iterator = self.engine.setRepeat(name, expr)
         while iterator.next():
             self.interpret(block)
-
-    def do_text(self, text):
-        text = cgi.escape(text)
-        self.stream_write(text)
 
     def do_rawtext(self, text):
         self.stream_write(text)