Re: v1.0.2 question

Tim Peters (tim@ksr.com)
Thu, 05 May 94 21:56:45 -0400

> [guido]
> ... I wanted to add a (writable?) func_doc string attribute ...

Writable, yes! Three good reasons:

1) So we can, a la John's suggestion, define _large_ doc blocks at module
level (where they interfere with code readability & natural doc layout
the least), and assign them later.

2) So that if a system of doc-specific escape codes is developed in the
future (e.g., look at all the doc escape codes in elisp, and the extra
ones invented for pymode), a processed version of the docs can be
stored back after the first time. I'm picturing the escape codes as
being defined by convention (not by the language), and the escape-
code processor as a vanilla Python function. The initial "func_doc"
value may, e.g., even be a machine-generated index into a canned text
file; etc.

3) Change the name of the attribute from "func_doc" to "obj_doc" before
it's too late. Then we can also assign to, e.g., module.obj_doc,
without more work on your part, and the "help" function can key off a
uniform if hasattr(object, 'obj_doc'): # this object has a doc string

my-biggest-regret-with-pymode-is-that-i-have-to-maintain-the-dutch-
language-version-separately<wink>-ly y'rs - tim

Tim Peters tim@ksr.com
not speaking for Kendall Square Research Corp