Message85859
Attached is a patch that adds the iterator protocol.
Now it can be interated through like:
>>> for k in d: print k, d[k]
...
key1 vale1
key3 vale3
key0 vale0
key2 vale2
key4 vale4
The problem is there is no way to get the internal pointer back to the
start. So Once it reached to the end, you are done.
>>> for k in d: print k, d[k]
...
The solution to this would be:
- Add a method to get the pointer back to the start
(with {first,next}key API)
- Add a method that returns a generator |
|
Date |
User |
Action |
Args |
2009-04-11 14:11:29 | akitada | set | recipients:
+ akitada |
2009-04-11 14:11:29 | akitada | set | messageid: <1239459089.3.0.568639974223.issue5736@psf.upfronthosting.co.za> |
2009-04-11 14:11:27 | akitada | link | issue5736 messages |
2009-04-11 14:11:27 | akitada | create | |
|