Fixes for various issues reported and discovered since Python 9:
Factor description of import errors into DocImportError.__str__.
Add "docother" and "fail" methods to Doc class.
Factor formatting of constants into "docother".
Increase max string repr limit to 100 characters.
Factor page generation into HTMLDoc.page.
Handle aliasing of names (objects appearing under an attribute
    name different from their intrinsic __name__) by passing the
    attribute name into each doc* method.
Handle methods at top level of modules (e.g. in random).
Try to do reloading efficiently.

Important fixes still to do:
    Module reloading is broken by the unfortunate property that
        failed imports leave an incomplete module in sys.  Still
        need to think of a good solution.
    Can't document modules in the current directory, due to the
        other unfortunate property that sys.path gets '.' when
        you run 'python' but it gets the script directory when
        you run a script.  Need to ponder to find a solution.
    The synopsis() routine does not work on .so modules.
    Aliases cause duplicate copies of documentation to appear.
        This is easy to fix, just more work.
    Classes appear as their intrinsic name, not their attribute name,
        in the class hierarchy.  This should be fixed.
    Inherited methods should be listed in class descriptions.
1 file changed