parameters: (name, attrs, bases=(object,), **attributes_arguments)
return_statement: return _attrs(these=cls_dict, **attributes_arguments)(type_)
docstring: A quick way to create a new class called *name* with *attrs*.
  
      :param str name: The name for the new class.
  
      :param attrs: A list of names or a dictionary of mappings of names to
          attributes.
  
          If *attrs* is a list or an ordered dict (`dict` on Python 3.6+,
          `collections.OrderedDict` otherwise), the order is deduced from
          the order of the names or attributes inside *attrs*.  Otherwise the
          order of the definition of the attributes is used.
      :type attrs: `list` or `dict`
  
      :param tuple bases: Classes that the new class will subclass.
  
      :param attributes_arguments: Passed unmodified to `attr.s`.
  
      :return: A new class with *attrs*.
      :rtype: type
  
      .. versionadded:: 17.1.0 *bases*
      .. versionchanged:: 18.1.0 If *attrs* is ordered, the order is retained.
docstring_summary: A quick way to create a new class called *name* with *attrs*.
docstring_tokens: A quick way to create a new class called * name * with * attrs * .
function: def make_class(name, attrs, bases=(object,), **attributes_arguments):
      """
      A quick way to create a new class called *name* with *attrs*.
  
      :param str name: The name for the new class.
  
      :param attrs: A list of names or a dictionary of mappings of names to
          attributes.
  
          If *attrs* is a list or an ordered dict (`dict` on Python 3.6+,
          `collections.OrderedDict` otherwise), the order is deduced from
          the order of the names or attributes inside *attrs*.  Otherwise the
          order of the definition of the attributes is used.
      :type attrs: `list` or `dict`
  
      :param tuple bases: Classes that the new class will subclass.
  
      :param attributes_arguments: Passed unmodified to `attr.s`.
  
      :return: A new class with *attrs*.
      :rtype: type
  
      .. versionadded:: 17.1.0 *bases*
      .. versionchanged:: 18.1.0 If *attrs* is ordered, the order is retained.
      """
      if isinstance(attrs, dict):
          cls_dict = attrs
      elif isinstance(attrs, (list, tuple)):
          cls_dict = dict((a, attrib()) for a in attrs)
      else:
          raise TypeError("attrs argument must be a dict or a list.")
  
      pre_init = cls_dict.pop("__attrs_pre_init__", None)
      post_init = cls_dict.pop("__attrs_post_init__", None)
      user_init = cls_dict.pop("__init__", None)
  
      body = {}
      if pre_init is not None:
          body["__attrs_pre_init__"] = pre_init
      if post_init is not None:
          body["__attrs_post_init__"] = post_init
      if user_init is not None:
          body["__init__"] = user_init
  
      type_ = new_class(name, bases, {}, lambda ns: ns.update(body))
  
      # For pickling to work, the __module__ variable needs to be set to the
      # frame where the class is created.  Bypass this step in environments where
      # sys._getframe is not defined (Jython for example) or sys._getframe is not
      # defined for arguments greater than 0 (IronPython).
      try:
          type_.__module__ = sys._getframe(1).f_globals.get(
              "__name__", "__main__"
          )
      except (AttributeError, ValueError):
          pass
  
      # We do it here for proper warnings with meaningful stacklevel.
      cmp = attributes_arguments.pop("cmp", None)
      (
          attributes_arguments["eq"],
          attributes_arguments["order"],
      ) = _determine_attrs_eq_order(
          cmp,
          attributes_arguments.get("eq"),
          attributes_arguments.get("order"),
          True,
      )
  
      return _attrs(these=cls_dict, **attributes_arguments)(type_)
function_tokens: def make_class ( name , attrs , bases = ( object , ) , * * attributes_arguments ) : if isinstance ( attrs , dict ) : cls_dict = attrs elif isinstance ( attrs , ( list , tuple ) ) : cls_dict = dict ( ( a , attrib ( ) ) for a in attrs ) else : raise TypeError ( "attrs argument must be a dict or a list." ) pre_init = cls_dict . pop ( "__attrs_pre_init__" , None ) post_init = cls_dict . pop ( "__attrs_post_init__" , None ) user_init = cls_dict . pop ( "__init__" , None ) body = { } if pre_init is not None : body [ "__attrs_pre_init__" ] = pre_init if post_init is not None : body [ "__attrs_post_init__" ] = post_init if user_init is not None : body [ "__init__" ] = user_init type_ = new_class ( name , bases , { } , lambda ns : ns . update ( body ) ) # For pickling to work, the __module__ variable needs to be set to the # frame where the class is created.  Bypass this step in environments where # sys._getframe is not defined (Jython for example) or sys._getframe is not # defined for arguments greater than 0 (IronPython). try : type_ . __module__ = sys . _getframe ( 1 ) . f_globals . get ( "__name__" , "__main__" ) except ( AttributeError , ValueError ) : pass # We do it here for proper warnings with meaningful stacklevel. cmp = attributes_arguments . pop ( "cmp" , None ) ( attributes_arguments [ "eq" ] , attributes_arguments [ "order" ] , ) = _determine_attrs_eq_order ( cmp , attributes_arguments . get ( "eq" ) , attributes_arguments . get ( "order" ) , True , ) return _attrs ( these = cls_dict , * * attributes_arguments ) ( type_ )