Per thread data

Gerhard Häring gh at
Mon Jul 9 15:11:56 CEST 2007

Will McGugan wrote:
> Hi,
> Is there a canonical way of storing per-thread data in Python?

Good question.

There's threading.local() which creates a thread-local object for you.

Maybe this Cookbook entry is helpful:

-- Gerhard

More information about the Python-list mailing list