On Tue, 23 Nov 2010 15:15:29 +, Michael Foord wrote:
> There are still two reasonable APIs (unless you have changed your mind
> and think that sticking with plain integers is best), of which I prefer
> the latter:
>
> SOME_CONST = Constant('SOME_CONST', 1)
> OTHER_CONST = Constant('OTHER_CON
I noticed that thread._local can leak references if objects are
being stored inside the thread._local object whose destructors
might release the GIL.
The way this happens is that in Modules/threadmodule.c, in the
_ldict() function, it does things like this:
Py_CLEAR(self->dict);