def subscribe ( self , handler ) : assert callable ( handler ) , "Invalid handler %s" % handler self . handlers . append ( handler )
python unable to add handler
Adds a new event handler .
def subscribe(self, handler):
        """Adds a new event handler."""
        assert callable(handler), "Invalid handler %s" % handler
        self.handlers.append(handler)