pre-PEP for optional 'pass'
Alex Martelli
aleax at aleax.it
Wed Apr 17 12:20:29 EDT 2002
brueckd at tbye.com wrote:
...
> No, you were being chastised for promoting a horrible standard - that
> *all* classes and *all* methods should have a docstring. It's just plain
> wrong.
Even if a method is "so obvious as not to need a docstring" it's hardly
the end of the world to put an empty docstring there. Few methods would
thus qualify IMHO -- just a few special methods whose semantics is entirely
Python-dictated, when there's absolutely nothing to say that's of interest.
This stance is partly based on my belief that boilerplate code should not
exist, of course -- if your style is to have classes full of methods named
getBlah whose body is "return blah", that would change things -- but I think
you'd be better advised to use properties for such things, instead:-).
Alex
More information about the Python-list
mailing list