accessor/mutator functions
Nick Craig-Wood
nick at craig-wood.com
Tue Mar 1 12:30:01 EST 2005
Dan Sommers <me at privacy.net> wrote:
> We used to have holy wars over the appropriate level of comments in
> source code.
Well according to the refactoring book I just read (by Martin Fowler)
the appropriate level of comments is None. If you see a comment you
should extract the complicated code into a method with a useful name,
or add well named intermediate variables, or add an assertion.
Its a point of view... Not 100% sure I agree with it but I see where
he is coming from. I like a doc-string per public method so pydoc
looks nice myself...
--
Nick Craig-Wood <nick at craig-wood.com> -- http://www.craig-wood.com/nick
More information about the Python-list
mailing list