[Python-Dev] Re: [PEP 224] Attribute Docstrings (original) (raw)

M.-A. Lemburg mal@lemburg.com
Wed, 30 Aug 2000 10:35:00 +0200


Christian Tanzer wrote:

"M.-A. Lemburg" <mal@lemburg.com> wrote: > > Triple quoted strings work -- that's what I'm constantly using. The > > downside is, that the docstrings either contain spurious white space > > or it messes up the layout of the code (if you start subsequent lines > > in the first column). > > Just a question of how smart you doc string extraction > tools are. Have a look at hack.py: Come on. There are probably hundreds of hacks around to massage docstrings. I've written one myself. Ka-Ping Yee suggested inspect.py...

That's the point I wanted to make: there's no need to care much about """-string formatting while writing them as long as you have tools which do it for you at extraction time.

My point was that in such cases it is much better if the language does it than if everybody does his own kludge. If a change of the Python parser concerning this point is out of the question, why not have a standard module providing this functionality (Ka-Ping Yee offered one , ).

Would be a nice addition for Python's stdlib, yes. Maybe for 2.1, since we are in feature freeze for 2.0...

-- Marc-Andre Lemburg


Business: http://www.lemburg.com/ Python Pages: http://www.lemburg.com/python/