def subscribe(self, handler):
        if self.__emitting:
            self.__toSubscribe.append(handler)
        elif handler not in self.__handlers:
            self.__handlers.append(handler)
dataset/ETHPy150Open gbeced/pyalgotrade/pyalgotrade/observer.py/Event.subscribe/original