> On 23 Jan 2021, at 17:23, Avi Gross via Python-list
> wrote:
>
> I am wondering how hard it would be to let some generators be resettable?
That is generally thought to be a bad thing in OOD.
Classes that reset are usually a code smell and often a source of bugs.
Why not just assign a new
On Sun, Jan 24, 2021 at 8:49 AM Cameron Simpson wrote:
>
> On 23Jan2021 12:20, Avi Gross wrote:
> >I am wondering how hard it would be to let some generators be resettable?
> >
> >I mean if you have a generator with initial conditions that change as it
> >progresses, could it cache away those ini
On 23Jan2021 12:20, Avi Gross wrote:
>I am wondering how hard it would be to let some generators be resettable?
>
>I mean if you have a generator with initial conditions that change as it
>progresses, could it cache away those initial conditions and upon some
>signal, simply reset them? Objects of
I am wondering how hard it would be to let some generators be resettable?
I mean if you have a generator with initial conditions that change as it
progresses, could it cache away those initial conditions and upon some
signal, simply reset them? Objects of many kinds can be set up with say a
reinit
On 1/23/2021 2:54 AM, Unknown wrote:
Le 20/12/2020 à 21:00, danilob a écrit :
b = ((x[0] for x in a))
There is a useless pair of parenthesis
b = (x[0] for x in a)
b is a GENERATOR expression
first list(b) calls next method on b repetedly until b is empty.
So it provides the "content" of