[PEP 224] Attribute Docstrings
Thomas Bellman
bellman at lysator.liu.se
Wed Aug 30 18:06:49 EDT 2000
tanzer at swing.co.at (Christian Tanzer) writes:
> IMHO, David Goodger's (<dgoodger at bigfoot.com>) idea of using a
> __docs__ dictionary is a better solution:
> - It provides all docstrings for the attributes of an object in a
> single place.
> * Handy in interactive mode.
> * This simplifies the generation of documentation considerably.
> - It is easier to explain in the documentation
Even better might be to make __docs__ an object with attributes,
so instead of C.__docs__['a'], you would use C.__docs__.a. That
would be even more handy in interactive mode. And of course,
C.__docs__.__dict__ would give you all the doc strings.
--
Thomas Bellman, Lysator Computer Club, Linköping University, Sweden
"You cannot achieve the impossible without ! bellman @ lysator.liu.se
attempting the absurd." ! Make Love -- Nicht Wahr!
More information about the Python-list
mailing list