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

2006-11-01 Thread Kent Johnson
Kent Johnson wrote: > Bob Gailer wrote: >> Asrarahmed Kadri wrote: >>> >>> 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

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

2006-10-28 Thread Danny Yoo
> My understanding is that an iterator is basically a facade` pattern. > If you aren't familiar with patterns, a facade` pattern basically makes > something really easy to use or convenient. Yes, you can "do it by > hand", and many times that is indeed the preferred method, but sometimes > it'

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

2006-10-28 Thread Jonathon Sisson
My understanding is that an iterator is basically a facade` pattern. If you aren't familiar with patterns, a facade` pattern basically makes something really easy to use or convenient. Yes, you can "do it by hand", and many times that is indeed the preferred method, but sometimes it's easier

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

2006-10-27 Thread wesley chun
> 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..? > > And what is a generator ..? I did try to read about these two things on the > web, but still I AM CONFUSED. here are some more place

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

2006-10-27 Thread David Heiser
D] 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 generator

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

2006-10-27 Thread Kent Johnson
Bob Gailer wrote: > Asrarahmed Kadri wrote: >> >> 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! No, actually iterato

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

2006-10-27 Thread Bob Gailer
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 generato

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

2006-10-27 Thread Asrarahmed Kadri
    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..?   And what is a generator ..? I did try to read about these two things on the web, but still I AM CONFUSED.   To be honest, I am