~mdw
/
mLib-python
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(from parent 1:
26d9d0f
)
mapping: Make the iterators conform to the proper interface.
author
Mark Wooding
<mdw@distorted.org.uk>
Wed, 15 Mar 2006 01:23:15 +0000
(
01:23
+0000)
committer
Mark Wooding
<mdw@distorted.org.uk>
Wed, 15 Mar 2006 01:23:15 +0000
(
01:23
+0000)
An iterator must implement __iter__() as an identity operation. Make it so.
mapping.pyx
patch
|
blob
|
blame
|
history
diff --git
a/mapping.pyx
b/mapping.pyx
index
aa5de85
..
ab637c3
100644
(file)
--- a/
mapping.pyx
+++ b/
mapping.pyx
@@
-172,6
+172,8
@@
cdef class MapIterBase:
def __new__(me):
me.i = m._iter()
me._init()
+ def __iter__(me):
+ return me
def __next__(me):
cdef void *e
e = me.i._next()