[ZPT] CVS: Packages/Products/PageTemplates (Products/DC/PageTemplates) - TALES.py:1.18 CHANGES.txt:1.10

evan@serenade.digicool.com evan@serenade.digicool.com
Thu, 21 Jun 2001 10:03:55 -0400


Update of /cvs-repository/Packages/Products/PageTemplates
In directory serenade:/home/evan/Zope/pt/lib/python/Products/PageTemplates

Modified Files:
	TALES.py CHANGES.txt 
Log Message:
Allow tal:repeat="nothing", and similar.



--- Updated File TALES.py in package Packages/Products/PageTemplates --
--- TALES.py	2001/06/16 15:39:47	1.17
+++ TALES.py	2001/06/21 14:03:55	1.18
@@ -269,6 +269,8 @@
 
     def setRepeat(self, name, expr):
         expr = self.evaluate(expr)
+        if not expr:
+            return self._engine.Iterator(name, (), self)
         it = self._engine.Iterator(name, expr, self)
         old_value = self.repeat_vars.get(name)
         self._scope_stack[-1].append((name, old_value))

--- Updated File CHANGES.txt in package Packages/Products/PageTemplates --
--- CHANGES.txt	2001/06/16 16:24:57	1.9
+++ CHANGES.txt	2001/06/21 14:03:55	1.10
@@ -8,5 +8,7 @@
 
       Features Added
 
+        - Allow any false value in tal:repeat to act as an empty sequence.
+
       Bugs Fixed