Andreas Kostyrka wrote: > * Kent Johnson <[EMAIL PROTECTED]> [070414 19:30]: >> Rather than store your attributes directly in the thread, it would >> probably be better to use a threading.local() object as the container. >> http://docs.python.org/lib/module-threading.html#l2h-3416 >> >> I don't really know if it makes any difference but this is the supported >> mechanism for thread-local storage. > > Well, the other mechanism is also supported, because subclassing > threads is allowed, and subclasses need to keep their attributes, even > if accessed via threading.currentThread().
That's a good point. Does anyone know when to prefer threading.local() vs thread attributes? Kent _______________________________________________ Tutor maillist - [EMAIL PROTECTED] http://mail.python.org/mailman/listinfo/tutor