Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Z
Zope
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
Zope
Commits
57c57cff
Commit
57c57cff
authored
Oct 21, 2003
by
Andreas Jung
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
- Collector #1087: ZPT: "repeat/item/length" did not work as documented
in the Zope Book.
parent
b955ddbd
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
8 additions
and
2 deletions
+8
-2
doc/CHANGES.txt
doc/CHANGES.txt
+3
-0
lib/python/ZTUtils/Iterator.py
lib/python/ZTUtils/Iterator.py
+5
-2
No files found.
doc/CHANGES.txt
View file @
57c57cff
...
...
@@ -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.
...
...
lib/python/ZTUtils/Iterator.py
View file @
57c57cff
...
...
@@ -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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment