parameters: (self, value, default=Undefined)
return_statement: return default
docstring: Selects enum-value by using its number-constant.
docstring_summary: Selects enum-value by using its number-constant.
docstring_tokens: Selects enum - value by using its number - constant .
function: def select_by_number(self, value, default=Undefined):
          """Selects enum-value by using its number-constant."""
          assert isinstance(value, int)
          enum_members = self.enum_class.__members__
          for enum_item in enum_members.values():
              if enum_item.value == value:
                  return enum_item
          # -- NOT FOUND:
          return default
function_tokens: def select_by_number ( self , value , default = Undefined ) : assert isinstance ( value , int ) enum_members = self . enum_class . __members__ for enum_item in enum_members . values ( ) : if enum_item . value == value : return enum_item # -- NOT FOUND: return default