def __eq__(self, other):
        """Compare State."""
        if isinstance(other, int):
            return self.__state == other
        if isinstance(other, EventState):
            return self.__state == other.state

        return False
def __eq__ ( self , other ) : if isinstance ( other , int ) : return self . __state == other if isinstance ( other , EventState ) : return self . __state == other . state return False
Compare State.