Diez B. Roggisch schrieb:
Emanuele D'Arrigo schrieb:
Hi everybody,
Assuming a snippet such as:
threadLocalData = threading.local()
threadLocalData.myDictionary = self.myDictionary
is it correct to say that threadLocalData.myDictionary is NOT a thread-
local -copy- of self.myDictionary but it's actually pointing to the
same object?
Yes, it's pointing to the same object, and it thus makes the whole
purpose of threadlocal moot. Use a global.
Scratch the "use a global" - that's of course nonsense. Use
self.myDictionary directly, or wherever the dict comes from.
Diez
--
http://mail.python.org/mailman/listinfo/python-list