Generating User Documentation
from Doc Strings


Table of Contents


An obvious application of doc strings is the generation of user documentation in "printed" form and in browsers.

I have been able to (easily) automatically generate user documentation from doc strings.

Now that we have some experience using doc strings, is there anything that can be done to make them more useful?

1. doc_collect, by Daniel Larsson

2. My attempt at automatic generation of documentation for extension modules

2.1. Problems

2.2. Proposal

I suggest the creation of a "method list" type. Method list object pointers could optionally be created by extension modules and a pointer put in the type object structure.

A standard getattr function should also be provided that uses method lists objects. Perhaps python could call it automatically.

I would be willing to come up with a first-cut implementation.

Method list object requirements?

3. Should we say anything more about doc string format?

It is critical for doc strings to be readily available in the interpreter, so if explicit markup is used, then we need to provide standard formatting tools within the interpreter.