              if not hasattr(cls, key):
                  raise TypeError("%s() received an invalid keyword %r" % (
                      cls.__name__, key))
  
          def view(request, *args, **kwargs):
              self = cls(**initkwargs)
              # We also store the mapping of request methods to actions,
              # so that we can later set the action attribute.
              # eg. `self.action = 'list'` on an incoming GET request.
 
</s> remove         view.suffix = initkwargs.get('suffix', None)
 </s> add  </s> remove                 pass
 </s> add                 raise NotImplementedError </s> remove         return func(self.__class__, html)
 </s> add         return func(self, html)
        # name and suffix are mutually exclusive
        if 'name' in initkwargs and 'suffix' in initkwargs:
            raise TypeError("%s() received both `name` and `suffix`, which are "
                            "mutually exclusive arguments." % (cls.__name__))

              if not hasattr(cls, key):
                  raise TypeError("%s() received an invalid keyword %r" % (
                      cls.__name__, key))
  
        # name and suffix are mutually exclusive
        if 'name' in initkwargs and 'suffix' in initkwargs:
            raise TypeError("%s() received both `name` and `suffix`, which are "
                            "mutually exclusive arguments." % (cls.__name__))

          def view(request, *args, **kwargs):
              self = cls(**initkwargs)
              # We also store the mapping of request methods to actions,
              # so that we can later set the action attribute.
              # eg. `self.action = 'list'` on an incoming GET request.
keep keep keep add keep keep keep keep keep
 Improvements to ViewSet extra actions (#5605)

* View suffix already set by initializer

* Add 'name' and 'description' attributes to ViewSet

ViewSets may now provide their `name` and `description` attributes
directly, instead of relying on view introspection to derive them.
These attributes may also be provided with the view's initkwargs.

The ViewSet `name` and `suffix` initkwargs are mutually exclusive.

The `action` decorator now provides the `name` and `description` to
the view's initkwargs. By default, these values are derived from the
method name and its docstring. The `name` may be overridden by providing
it as an argument to the decorator.

The `get_view_name` and `get_view_description` hooks now provide the
view instance to the handler, instead of the view class. The default
implementations of these handlers now respect the `name`/`description`.

* Add 'extra actions' to ViewSet & browsable APIs

* Update simple router tests

Removed old test logic around link/action decorators from `v2.3`. Also
simplified the test by making the results explicit instead of computed.

* Add method mapping to ViewSet actions

* Document extra action method mapping 
rest_framework/viewsets.py