(self, topic, more_xrefs='')
return doc, xrefs
Return unbuffered tuple of (topic, xrefs).

        If an error occurs here, the exception is caught and displayed by
        the url handler.

        This function duplicates the showtopic method but returns its
        result directly so it can be formatted for display in an html page.
Return unbuffered tuple of (topic, xrefs).
Return unbuffered tuple of ( topic xrefs ) .
def _gettopic(self, topic, more_xrefs=''):
        """Return unbuffered tuple of (topic, xrefs).

        If an error occurs here, the exception is caught and displayed by
        the url handler.

        This function duplicates the showtopic method but returns its
        result directly so it can be formatted for display in an html page.
        """
        try:
            import pydoc_data.topics
        except ImportError:
            return('''
Sorry, topic and keyword documentation is not available because the
module "pydoc_data.topics" could not be found.
''' , '')
        target = self.topics.get(topic, self.keywords.get(topic))
        if not target:
            raise ValueError('could not find topic')
        if isinstance(target, str):
            return self._gettopic(target, more_xrefs)
        label, xrefs = target
        doc = pydoc_data.topics.topics[label]
        if more_xrefs:
            xrefs = (xrefs or '') + ' ' + more_xrefs
        return doc, xrefs
def _gettopic ( self , topic , more_xrefs = '' ) : try : import pydoc_data . topics except ImportError : return ( '''
Sorry, topic and keyword documentation is not available because the
module "pydoc_data.topics" could not be found.
''' , '' ) target = self . topics . get ( topic , self . keywords . get ( topic ) ) if not target : raise ValueError ( 'could not find topic' ) if isinstance ( target , str ) : return self . _gettopic ( target , more_xrefs ) label , xrefs = target doc = pydoc_data . topics . topics [ label ] if more_xrefs : xrefs = ( xrefs or '' ) + ' ' + more_xrefs return doc , xrefs