[ZPT] CVS: Zope3/lib/python/Zope/TAL - TALDefs.py:1.24.10.4

Steve Alexander steve@cat-box.net
Mon, 18 Mar 2002 16:46:31 -0500


Update of /cvs-repository/Zope3/lib/python/Zope/TAL
In directory cvs.zope.org:/tmp/cvs-serv7579

Modified Files:
      Tag: Zope-3x-branch
	TALDefs.py 
Log Message:
TALDefs used to check that a macro program was of type list.
Now it does not do so. This change is to support the use of TAL
with Zope 3, where the list may be wrapped in a semi-transparent
context-wrapper. Unfortunately, isinstance() is not aware of 
context-wrappers.



=== Zope3/lib/python/Zope/TAL/TALDefs.py 1.24.10.3 => 1.24.10.4 ===
 
 def getProgramVersion(program):
-    if (isinstance(program, ListType) and len(program) >= 2 and
+    if (len(program) >= 2 and
         isinstance(program[0], TupleType) and len(program[0]) == 2):
         opcode, version = program[0]
         if opcode == "version":