[ZPT] CVS: Zope3/lib/python/Zope/TAL - TALGenerator.py:1.52.16.3.4.6
Barry Warsaw
barry@wooz.org
Tue, 4 Jun 2002 12:43:31 -0400
Update of /cvs-repository/Zope3/lib/python/Zope/TAL
In directory cvs.zope.org:/tmp/cvs-serv8810
Modified Files:
Tag: fdrake-tal-i18n-branch
TALGenerator.py
Log Message:
actionIndex, optimizeStartTag(): Remove this mapping from action names
to integers. The intermediate code now contains the action names
since that's easier to read and debug.
=== Zope3/lib/python/Zope/TAL/TALGenerator.py 1.52.16.3.4.5 => 1.52.16.3.4.6 ===
# needed by the processing
#
- actionIndex = {"replace":0, "insert":1, "metal":2, "tal":3, "xmlns":4,
- 0: 0, 1: 1, 2: 2, 3: 3, 4: 4}
def optimizeStartTag(self, collect, name, attrlist, end):
# return true if the tag can be converted to plain text
if not attrlist:
@@ -136,9 +134,7 @@
item = attrlist[i]
if len(item) > 2:
opt = 0
- # XXX why are we converting action to an integer?
name, value, action = item[:3]
- action = self.actionIndex[action]
attrlist[i] = (name, value, action) + item[3:]
else:
if item[1] is None: