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] __del__ is not called after creating a new reference

2017-04-02 Thread Oleg Nesterov
On 04/02, Armin Rigo wrote: > > Hi all, > > On 20 March 2017 at 22:28, Nathaniel Smith wrote: > > Modern CPython, and all extant versions of PyPy and Jython, guarantee that > > __del__ is called at most once. > > Just a note, if someone actually depends on this: it is not true in

Re: [Python-Dev] __del__ is not called after creating a new reference

2017-04-02 Thread Armin Rigo
Hi all, On 20 March 2017 at 22:28, Nathaniel Smith wrote: > Modern CPython, and all extant versions of PyPy and Jython, guarantee that > __del__ is called at most once. Just a note, if someone actually depends on this: it is not true in all cases. For example, in CPython 3.5.3: