Message241752
| Author |
eric.snow |
| Recipients |
docs@python, eric.snow, eryksun, ethan.furman, paul.moore, rhettinger |
| Date |
2015年04月21日.22:34:42 |
| SpamBayes Score |
-1.0 |
| Marked as misclassified |
Yes |
| Message-id |
<1429655682.28.0.603601265872.issue24020@psf.upfronthosting.co.za> |
| In-reply-to |
| Content |
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. |
|