This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author akitada
Recipients akitada
Date 2009-04-11.14:11:26
SpamBayes Score 7.8043104e-07
Marked as misclassified No
Message-id <1239459089.3.0.568639974223.issue5736@psf.upfronthosting.co.za>
In-reply-to
Content
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
History
Date User Action Args
2009-04-11 14:11:29akitadasetrecipients: + akitada
2009-04-11 14:11:29akitadasetmessageid: <1239459089.3.0.568639974223.issue5736@psf.upfronthosting.co.za>
2009-04-11 14:11:27akitadalinkissue5736 messages
2009-04-11 14:11:27akitadacreate