Jia-Yu Aw wrote:
> How to use __iter__
> Von:
> Jia-Yu Aw
> Antwortadresse:
> Jia-Yu Aw
> Datum:
> Dienstag, 9. August 2011 03:48:20
> An:
> tutor@python.org
> Gruppen:
> gmane.comp.python.tutor
> Hi all
>
> I've been learning Classes and have read the documentation on __iter__ but
st
Hi all
I've been learning Classes and have read the documentation on __iter__ but
still don't understand how it works. I have two pieces of code: the first is
def __iter__, the second is using __iter__. Instead of being an iterator, I'm
just using this is a function, which I think is incorrect.