def __eq__(self, other): if (isinstance(other, DynamicEnum) and # compare dynamic enums by name and value identity other.name == self.name and other.value == self.value): return True return Enum.__eq__(self, other)
def __eq__(self, other): """Override equality for string comparison.""" if isinstance(other, str): return other.upper() == self.name return Enum.__eq__(self, other)
def __eq__(self, other): return int(self).__eq__(other) if isinstance(other, int) else Enum.__eq__(self, other)
def __eq__(self, o: object) -> bool: if type(o) == str: return self.value == o else: return Enum.__eq__(o)
def __eq__(self, other): return Enum.__eq__(self, other)
def __eq__(self, other): # noinspection PyArgumentList return Enum.__eq__(self, other)