def __init__(self, *args, **kwargs): zmq.Socket.__init__(self, *args, **kwargs) # # Keep track of which thread this socket was created in # self.__dict__['_thread'] = threading.current_thread()