[Tutor] I am terribly confused about "generators" and "iterators".. Help me

David Heiser David.Heiser at intelliden.com
Fri Oct 27 18:41:51 CEST 2006


May I invite EVERYONE to NOT introduce political or religious elements
into these discussions. It has no place here and can destroy this
excellent discussion group. I've seen it happen.

PLEASE take it elsewhere.


-----Original Message-----
From: tutor-bounces at python.org [mailto:tutor-bounces at python.org] On
Behalf Of Bob Gailer
Sent: Friday, October 27, 2006 10:11 AM
To: Asrarahmed Kadri
Cc: pythontutor
Subject: Re: [Tutor] I am terribly confused about "generators" and
"iterators".. Help me


Asrarahmed Kadri wrote:
>  
>  
> Hi Folks,
>  
> What are generators and iterators...??And why are they are needed..??
>  
> I can do my stuff with a 'for' or a 'while' loop.. so why do I need an
> ITERATOR..?
iterators & generators do not replace while or for loops! 
>  
> And what is a generator ..? I did try to read about these two things
> on the web, but still I AM CONFUSED.
Well at risk of offering more web stuff, try 
http://heather.cs.ucdavis.edu/~matloff/Python/PyIterGen.pdf
>
> To HIM you shall return.
I am glad that this thought brings you some comfort or stimulation. I 
used to believe something similar, and all it did was bring me fear 
guilt and shame.


-- 
Bob Gailer
510-978-4454

_______________________________________________
Tutor maillist  -  Tutor at python.org
http://mail.python.org/mailman/listinfo/tutor


More information about the Tutor mailing list