Commit 57c57cff authored by Andreas Jung's avatar Andreas Jung

- Collector #1087: ZPT: "repeat/item/length" did not work as documented

       in the Zope Book.
parent b955ddbd
......@@ -16,6 +16,9 @@ Zope Changes
Bugs fixed
- Collector #1087: ZPT: "repeat/item/length" did not work as documented
in the Zope Book.
- Collector #721: Entities in tal:attribute values weren't
properly escaped.
......
......@@ -18,8 +18,8 @@ The Iterator() function accepts either a sequence or a Python
iterator. The next() method fetches the next item, and returns
true if it succeeds.
$Id: Iterator.py,v 1.9 2002/10/09 17:33:49 evan Exp $'''
__version__='$Revision: 1.9 $'[11:-2]
$Id: Iterator.py,v 1.10 2003/10/21 12:21:52 andreasjung Exp $'''
__version__='$Revision: 1.10 $'[11:-2]
class Iterator:
'''Simple Iterator class'''
......@@ -96,6 +96,9 @@ class Iterator:
if self.end: return 1
return not self.same_part(name, self.item, self._next)
def length(self):
return len(self.seq)
def same_part(self, name, ob1, ob2):
if name is None:
return ob1 == ob2
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment