Threads modify "global" variable -- asking for trouble?

J Rice rice.jeffrey at
Fri Mar 17 05:06:00 CET 2006

My apologizes, I missed the newish FAQ entry on this.  The addrbl()
method looks like this:

 def addRBL(self, testname, result, info=""):
        self.testresultsRBL[testname] = result, info

So according to the FAQ, D[x] = y, where D is a dictionary, is atomic
and therefore thread-safe.  Right?

More information about the Python-list mailing list