Re: [Python-Dev] PEP 442 undocumented C API functions

2017-08-27 Thread INADA Naoki
Hi, thanks to your report. > As far as I understand, if you have a custom tp_dealloc, you *have* to > call PyObject_CallFinalizerFromDealloc in order to get your tp_finalize > called. Is this correct? Sorry, I'm not expert of Object finalization process. But If my understanding is correct, you'r

Re: [Python-Dev] Pep 550 and None/masking

2017-08-27 Thread Nathaniel Smith
I believe that the current status is: - assigning None isn't treated specially – it does mask any underlying values (which I think is what we want) - there is currently no way to "unmask" - but it's generally agreed that there should be a way to do that, at least in some cases, to handle the sav

Re: [Python-Dev] Pep 550 and None/masking

2017-08-27 Thread Ethan Furman
On 08/27/2017 11:02 AM, Chris Jerdonek wrote: Hi Jim, it seems like each time you reply you change the subject line and start a new thread. Very few others are doing this (e.g. Yury when releasing a new version). Would it be possible for you to preserve the threading like others? I must admi

Re: [Python-Dev] Pep 550 and None/masking

2017-08-27 Thread Chris Jerdonek
Hi Jim, it seems like each time you reply you change the subject line and start a new thread. Very few others are doing this (e.g. Yury when releasing a new version). Would it be possible for you to preserve the threading like others? --Chris On Sun, Aug 27, 2017 at 9:08 AM Jim J. Jewett wrote:

[Python-Dev] Pep 550 and None/masking

2017-08-27 Thread Jim J. Jewett
Does setting an ImplicitScopeVar to None set the value to None, or just remove it? If it removes it, does that effectively unmask a previously masked value? If it really sets to None, then is there a way to explicitly unmask previously masked values? Perhaps the initial constructor should requir

[Python-Dev] Pep 550 module

2017-08-27 Thread Jim J. Jewett
I think there is general consensus that this should go in a module other than sys. (At least a submodule.) The specific names are still To Be Determined, but I suspect seeing the functions and objects as part of a named module will affect what works. So I am requesting that the next iteration jus

Re: [Python-Dev] PEP 550 v4

2017-08-27 Thread Yury Selivanov
On Sun, Aug 27, 2017 at 6:08 AM, Stefan Krah wrote: > On Sat, Aug 26, 2017 at 04:13:24PM -0700, Nathaniel Smith wrote: >> On Sat, Aug 26, 2017 at 7:58 AM, Elvis Pranskevichus >> wrote: >> > What we are talking about here is variable scope leaking up the call >> > stack. I think this is a bad pa

Re: [Python-Dev] PEP 550 v4: Decimal examples and performance

2017-08-27 Thread Stefan Krah
On Sat, Aug 26, 2017 at 12:21:44PM -0400, Yury Selivanov wrote: > On Sat, Aug 26, 2017 at 7:45 AM, Stefan Krah wrote: > >> This generic caching approach is similar to what the current C > >> implementation of ``decimal`` does to cache the the current decimal > >> context, and has similar performan

Re: [Python-Dev] PEP 550 v4

2017-08-27 Thread Stefan Krah
On Sat, Aug 26, 2017 at 04:13:24PM -0700, Nathaniel Smith wrote: > On Sat, Aug 26, 2017 at 7:58 AM, Elvis Pranskevichus > wrote: > > What we are talking about here is variable scope leaking up the call > > stack. I think this is a bad pattern. For decimal context-like uses > > of the EC you sho