parameters: (classdict, member_type, first_enum)
return_statement: return __new__, save_new, use_args
docstring: Returns the __new__ to be used for creating the enum members.
  
          classdict: the class dictionary given to __new__
          member_type: the data type whose __new__ will be used by default
          first_enum: enumeration to check for an overriding __new__
docstring_summary: Returns the __new__ to be used for creating the enum members.
docstring_tokens: Returns the __new__ to be used for creating the enum members .
function: def _find_new_(classdict, member_type, first_enum):
          """Returns the __new__ to be used for creating the enum members.
  
          classdict: the class dictionary given to __new__
          member_type: the data type whose __new__ will be used by default
          first_enum: enumeration to check for an overriding __new__
  
          """
          # now find the correct __new__, checking to see of one was defined
          # by the user; also check earlier enum classes in case a __new__ was
          # saved as __new_member__
          __new__ = classdict.get('__new__', None)
  
          # should __new__ be saved as __new_member__ later?
          save_new = __new__ is not None
  
          if __new__ is None:
              # check all possibles for __new_member__ before falling back to
              # __new__
              for method in ('__new_member__', '__new__'):
                  for possible in (member_type, first_enum):
                      target = getattr(possible, method, None)
                      if target not in {
                              None,
                              None.__new__,
                              object.__new__,
                              Enum.__new__,
                              }:
                          __new__ = target
                          break
                  if __new__ is not None:
                      break
              else:
                  __new__ = object.__new__
  
          # if a non-object.__new__ is used then whatever value/tuple was
          # assigned to the enum member name will be passed to __new__ and to the
          # new enum member's __init__
          if __new__ is object.__new__:
              use_args = False
          else:
              use_args = True
          return __new__, save_new, use_args
function_tokens: def _find_new_ ( classdict , member_type , first_enum ) : # now find the correct __new__, checking to see of one was defined # by the user; also check earlier enum classes in case a __new__ was # saved as __new_member__ __new__ = classdict . get ( '__new__' , None ) # should __new__ be saved as __new_member__ later? save_new = __new__ is not None if __new__ is None : # check all possibles for __new_member__ before falling back to # __new__ for method in ( '__new_member__' , '__new__' ) : for possible in ( member_type , first_enum ) : target = getattr ( possible , method , None ) if target not in { None , None . __new__ , object . __new__ , Enum . __new__ , } : __new__ = target break if __new__ is not None : break else : __new__ = object . __new__ # if a non-object.__new__ is used then whatever value/tuple was # assigned to the enum member name will be passed to __new__ and to the # new enum member's __init__ if __new__ is object . __new__ : use_args = False else : use_args = True return __new__ , save_new , use_args