Best way to document Python code...

Neil Cerutti horpner at
Tue Jan 23 17:28:48 CET 2007

On 2007-01-22, bearophileHUGS at <bearophileHUGS at> wrote:
> Boris Ozegovic:
>> Does Python has API just like in Java, for example
>> ctrl-f and
>> than click on class you are searching for, and finally you get clean list
>> of all fields and methods.  Where can I find similar in Python, for
>> example, if I would like to see which methods list/dictionary has.
> You can do that from the shell, with help(name) or dir(name),
> where name can be a class, object, most things.

It is OK for a lark, but sadly dir is not suitable enough. You do
need to refer to the documentation off-line or you'll miss vital
entries. It won't hurt to read, either, as I keep
finding out.

Also check out the interactive help system. If you've got the
html versions of the docs installed, it functions somewhat like
perldoc. Type help() at the interactive prompt to get started.

Neil Cerutti
Will the last person to leave please see that the perpetual light is
extinguished --sign at New England church

Posted via a free Usenet account from

More information about the Python-list mailing list