def __init__(self, listener=None, array=None, pool=None): self.listener = weakref.proxy(listener) if listener else None self._array = array if array else new_array() # np default buffer self.log = utils.get_logger(__name__) self.pool = pool if pool else self.listener
def prepost(self, listener, array=None, pool=None): self.listener = listener # array can be overriden at app load time self._array = array if array else new_array() # np default buffer self.pool = weakref.proxy(pool) if pool else self.listener