[Python-ideas] PEP 550 v2
yselivanov.ml at gmail.com
Wed Aug 23 20:36:38 EDT 2017
There's another "major" problem with theading.local()-like API for PEP
550: C API.
threading.local() in C right now is PyThreadState_GetDict(), which
returns a dictionary for the current thread, that can be
queried/modified with PyDict_* functions. For PEP 550 this would not
The advantage of the current ContextKey solution is that the Python
API and C API are essentially the same: 
Another advantage, is that ContextKey implements a better caching,
because it can have only one value cached in it, see  for details.
More information about the Python-ideas