[Zpt] CVS: Packages/TAL - TALGenerator.py:1.14

guido@digicool.com guido@digicool.com
Fri, 16 Mar 2001 13:42:58 -0500 (EST)


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

Modified Files:
	TALGenerator.py 
Log Message:
Optimize all start tags with only regular attributes.



--- Updated File TALGenerator.py in package Packages/TAL --
--- TALGenerator.py	2001/03/16 17:24:03	1.13
+++ TALGenerator.py	2001/03/16 18:42:58	1.14
@@ -147,6 +147,14 @@
         if not attrlist:
             collect.append("<%s%s" % (name, end))
             return 1
+        new = ["<" + name]
+        for item in attrlist:
+            if len(item) > 2:
+                return 0
+            new.append(" %s=%s" % (item[0], quote(item[1])))
+        new.append(end)
+        collect.extend(new)
+        return 1
 
     def todoPush(self, todo):
         self.todoStack.append(todo)