def add_documenter(cls):
 if (not issubclass(cls, Documenter)):
  raise ExtensionError(('autodoc documenter %r must be a subclass of Documenter' % cls))
 AutoDirective._registry[cls.objtype] = cls

def add_documenter ( cls ) : if ( not issubclass ( cls , Documenter ) ) : raise ExtensionError ( ( 'autodoc documenter %r must be a subclass of Documenter' % cls ) ) AutoDirective . _registry [ cls . objtype ] = cls
register a new documenter .