[Tutor] 2.7.3 generator objects
Ray Jones
crawlzone at gmail.com
Sun Sep 2 09:09:51 CEST 2012
On 09/01/2012 11:57 PM, eryksun wrote:
> To be an iterable in general, it suffices to have either an __iter__
> method or a __getitem__ method. Here are the glossary definitions:
> http://docs.python.org/glossary.html#term-iterable
> http://docs.python.org/glossary.html#term-iterator
After a few times re-reading, I'm beginning to get a glimmer....
> Also, here is the PEP for simple generators:
> http://www.python.org/dev/peps/pep-0255/
....but this is complete Greek! ;)
But didn't I read somewhere that you can reset an iterator to go through
the whole process again?
Ray
More information about the Tutor
mailing list