¡@

Home 

python Programming Glossary: lockedclass

How to make built-in containers (sets, dicts, lists) thread safe?

http://stackoverflow.com/questions/13610654/how-to-make-built-in-containers-sets-dicts-lists-thread-safe

classname return '_ s__ s' classname 'lock' class LockedClass type def __new__ mcls name bases dict_ # we'll bind these after.. self args kwargs #self is a class i.e. an instance of the LockedClass type instance super LockedClass self .__call__ args kwargs setattr.. i.e. an instance of the LockedClass type instance super LockedClass self .__call__ args kwargs setattr instance _lockname self.__name__..