On Apr 28, 6:38 pm, "J. Cliff Dyer" wrote:
> On Tue, 2009-04-28 at 10:41 +, Duncan Booth wrote:
> > Lacrima wrote:
>
> > > If it is not possible what are common techniques to use iterator or
> > > generator objects that allow restarting when it is needed?
>
> > The usual thing if you want to
On Tue, 2009-04-28 at 10:41 +, Duncan Booth wrote:
> Lacrima wrote:
>
> > If it is not possible what are common techniques to use iterator or
> > generator objects that allow restarting when it is needed?
>
> The usual thing if you want to use the generator's output more than once
> woul
Lacrima wrote:
> If it is not possible what are common techniques to use iterator or
> generator objects that allow restarting when it is needed?
The usual thing if you want to use the generator's output more than once
would be to convert the generator to a list, then you can iterate over it
On Apr 28, 1:04 pm, Chris Rebert wrote:
> On Tue, Apr 28, 2009 at 2:54 AM, Lacrima wrote:
> > Hello!
>
> > I am quite new to Python and I have maybe simple (or maybe not)
> > question.
>
> > Is it possible to restart generator when it is exhausted?
>
> No. You have to make a new instance of the g
On Tue, Apr 28, 2009 at 2:54 AM, Lacrima wrote:
> Hello!
>
> I am quite new to Python and I have maybe simple (or maybe not)
> question.
>
> Is it possible to restart generator when it is exhausted?
No. You have to make a new instance of the generator.
> What should I do to get the initial state