how to inherit docstrings?

Chris Angelico rosuav at gmail.com
Fri Jun 10 01:39:36 EDT 2011


On Fri, Jun 10, 2011 at 3:25 PM, Ben Finney <ben+python at benfinney.id.au> wrote:
> Ben Finney <ben+python at benfinney.id.au> writes:
>
>> class Square(Shape):
>>     """ An equal-sided quadrilateral polygon. """
>
> That this docstring is imprecise (it describes any rhombus, not
> necessarily a square) is something I hope no-one else notices or draws
> attention to.

class Square(Number):
    """ A class designed to confuse the issue arbitrarily. """
    pass

Chris Angelico



More information about the Python-list mailing list