#!/usr/local/bin/python3 from threading import Thread, local class C(object): l = local() l.d = {} def __init__(self, n, v): self.l.d = {} self.l.d[n] = v def f1(): C(1, 1) def f2(): C(2, 2) Thread(target=f1).start() Thread(target=f2).start() print(C.l.__dict__)