Currently, cgitb documents the hook (enable) and somewhat unclearly the ability to dump the HTML traceback to stdout, but despite that being technically available it does not document the ability to dump the traceback to a string as either text or html. Possible further improvement: make ``cgitb.html`` and ``cgitb.text`` implicitly call `sys.exc_info()` if not given a parameter (much like `cgitb.handler` does).
The main functions of the cgitb module are enable() and handler(). I would describe them first, and text() and html() at the end (maybe in separate subsection). Actually the main part of the descriptions of text() and html() can be shared and placed in a paragraph preceding them: "The following two functions handle..." Note that the documented name of the first parameter is "info", but actual name is "einfo".
Please don't close it yet. I agree with Serhiy's comments in , but I couldn't find time to address his comments yet (plus we still need to backport the documentation update to 3.5 and 3.6 branches)