#NEWLINE# def __call__( self , function = None , hookwrapper = False , optionalhook = False , tryfirst = False , trylast = False ) : #NEWLINE# #INDENT# ' if passed a function, directly sets attributes on the function\n        which will make it discoverable to register().  If passed no function,\n        returns a decorator which can be applied to a function later using\n        the attributes supplied.\n\n        If optionalhook is True a missing matching hook specification will not result\n        in an error (by default it is an error if no matching spec is found).\n\n        If tryfirst is True this hook implementation will run as early as possible\n        in the chain of N hook implementations for a specfication.\n\n        If trylast is True this hook implementation will run as late as possible\n        in the chain of N hook implementations.\n\n        If hookwrapper is True the hook implementations needs to execute exactly\n        one "yield".  The code before the yield is run early before any non-hookwrapper\n        function is run.  The code after the yield is run after all non-hookwrapper\n        function have run.  The yield receives an ``_CallOutcome`` object representing\n        the exception or result outcome of the inner calls (including other hookwrapper\n        calls).\n\n        ' #NEWLINE# def setattr_hookimpl_opts( func ) : #NEWLINE# #INDENT# setattr ( func , ( self . project_name + '_impl' ) , dict ( hookwrapper = hookwrapper , optionalhook = optionalhook , tryfirst = tryfirst , trylast = trylast ) ) #NEWLINE# return func #NEWLINE# #UNINDENT# if ( optionalhook is None ) : #NEWLINE# #INDENT# return setattr_hookimpl_opts #NEWLINE# #UNINDENT# else : #NEWLINE# #INDENT# return setattr_hookimpl_opts ( function )