Re: [Python-Dev] why _PyGen_Finalize(gen) propagates close() to _PyGen_yf() ?

2017-04-03 Thread Oleg Nesterov
On 04/03, Stephen J. Turnbull wrote: > > Nathaniel Smith writes: > > > > Well, I'm afraid to contact this closed and not-for-mortals list, > > > not sure this very basic question should go there ;) perhaps you > > > are already a member, feel free to forward. > > > > core-mentorship is

Re: [Python-Dev] why _PyGen_Finalize(gen) propagates close() to _PyGen_yf() ?

2017-04-02 Thread Nick Coghlan
On 3 April 2017 at 05:23, Stephen J. Turnbull wrote: > Nathaniel Smith writes: > > > > Well, I'm afraid to contact this closed and not-for-mortals list, > > > not sure this very basic question should go there ;) perhaps you > > > are already a member, feel

Re: [Python-Dev] why _PyGen_Finalize(gen) propagates close() to _PyGen_yf() ?

2017-04-02 Thread Stephen J. Turnbull
Nathaniel Smith writes: > > Well, I'm afraid to contact this closed and not-for-mortals list, > > not sure this very basic question should go there ;) perhaps you > > are already a member, feel free to forward. > > core-mentorship is intended as a friendly place for folks who are >

Re: [Python-Dev] why _PyGen_Finalize(gen) propagates close() to _PyGen_yf() ?

2017-03-31 Thread Martin Panter
On 31 March 2017 at 05:22, Nathaniel Smith wrote: >>> On Mon, Mar 20, 2017 at 11:30 AM, Oleg Nesterov wrote: >>> > [Aborting "yield" in a "for" loop leaves a sub-generator open, but >>> > aborting "yield from" cleans up the sub-generator] > > In any case the

Re: [Python-Dev] why _PyGen_Finalize(gen) propagates close() to _PyGen_yf() ?

2017-03-30 Thread Nathaniel Smith
On Thu, Mar 30, 2017 at 11:05 AM, Oleg Nesterov wrote: > On 03/28, Eric Snow wrote: >> >> On Mon, Mar 20, 2017 at 11:30 AM, Oleg Nesterov wrote: >> > Hello, >> > >> > Let me first clarify, I do not claim this is a bug, I am trying to learn >> > python and now I

Re: [Python-Dev] why _PyGen_Finalize(gen) propagates close() to _PyGen_yf() ?

2017-03-30 Thread Oleg Nesterov
On 03/28, Eric Snow wrote: > > On Mon, Mar 20, 2017 at 11:30 AM, Oleg Nesterov wrote: > > Hello, > > > > Let me first clarify, I do not claim this is a bug, I am trying to learn > > python and now I trying to understand yield-from. > > Given that you haven't gotten a response

Re: [Python-Dev] why _PyGen_Finalize(gen) propagates close() to _PyGen_yf() ?

2017-03-28 Thread Eric Snow
On Mon, Mar 20, 2017 at 11:30 AM, Oleg Nesterov wrote: > Hello, > > Let me first clarify, I do not claim this is a bug, I am trying to learn > python and now I trying to understand yield-from. Given that you haven't gotten a response here, you may want to take this over to the

[Python-Dev] why _PyGen_Finalize(gen) propagates close() to _PyGen_yf() ?

2017-03-20 Thread Oleg Nesterov
Hello, Let me first clarify, I do not claim this is a bug, I am trying to learn python and now I trying to understand yield-from. This simple test-case g = (x for x in range(10)) def fg(): for x in g: yield x print(next(fg()))