Organisation of python classes and their methods

Robert Kern robert.kern at
Fri Nov 2 11:55:06 CET 2012

On 11/2/12 10:21 AM, Peter Otten wrote:
> Martin Hewitson wrote:
>> On 2, Nov, 2012, at 09:40 AM, Mark Lawrence <breamoreboy at>
>> wrote:
>>> 20 lines of documentation per method?  As far as I'm concerned that's not
>>> a smell, that's a stink.
>> Wow, I don't think I've ever been criticised before for writing too much
>> documentation :)
>> I guess we have different end users. This is not a set of classes for
>> other developers to use: it's a set of classes which creates a data
>> analysis environment for scientists to use. They are not programmers, and
>> expect the algorithms to be documented in detail.
> While I would never discourage thorough documentation you may be better off
> with smaller docstrings and the details in an external document. Python
> projects typically use rst-files processed by sphinx.

In the science/math community, we tend to build the Sphinx API reference from 
the thorough, authoritative docstrings. We like having complete docstrings 
because we are frequently at the interactive prompt. We tend to have broad APIs, 
so having a single source of documentation and not repeating ourselves is important.

Robert Kern

"I have come to believe that the whole world is an enigma, a harmless enigma
  that is made terrible by our own mad attempt to interpret it as though it had
  an underlying truth."
   -- Umberto Eco

More information about the Python-list mailing list