[issue24020] threading.local() must be run at module level (doc improvement)
Eric Snow
report at bugs.python.org
Wed Apr 22 00:34:42 CEST 2015
Eric Snow added the comment:
Think of threading.local this way: instances of threading.local are shared between all the threads, but the effective "__dict__" of each instance is per-thread. Basically, the object stores a dict for each thread. In __getattribute__, __setattr__, and __delattr__ it swaps the dict for the current thread into place and then does proceeds normally.
----------
_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue24020>
_______________________________________
More information about the Python-bugs-list
mailing list