how to inherit docstrings?
Carl Banks
pavlovevidence at gmail.com
Thu Jun 9 23:13:58 EDT 2011
On Thursday, June 9, 2011 6:42:44 PM UTC-7, Ben Finney wrote:
> Carl Banks
> writes:
>
> > Presumably, the reason you are overriding a method in a subclass is to
> > change its behavior; I'd expect an inherited docstring to be
> > inaccurate more often than not.
>
> In which case the onus is on the programmer implementing different
> behaviour to also override the docstring.
Totally disagree. The programmer should never be under onus to correct mistakes made by the langauge. "In the face of ambiguity, refuse the temptation to guess."
When the language tries to guess what the programmer wants, you get monstrosities like Perl. Don't want to go there.
Carl Banks
More information about the Python-list
mailing list