def has_value_name ( self , name ) : for val , _ in self . _values : if val == name : return True return False
python how to check if value is in enum
Check if this enum has a particular name among its values .
def has_value_name(self, name):
        """Check if this `enum` has a particular name among its values.

        :param name: Enumeration value name
        :type name: str
        :rtype: True if there is an enumeration value with the given name
        """
        for val, _ in self._values:
            if val == name:
                return True
        return False