Newsgroups: comp.lang.python
From: Ben Finney <ben+pyt...@benfinney.id.au>
Date: Fri, 17 Jul 2009 11:01:49 +1000
Local: Thurs, Jul 16 2009 9:01 pm
Subject: Override a method but inherit the docstring
Howdy all,
The following is a common idiom:: class FooGonk(object): class BarGonk(FooGonk): The docstring for ‘FooGonk.frobnicate’ is, intentionally, perfectly Ideally there would be a way to specify that the docstring should be class BarGonk(FooGonk): but that violates DRY (the association between BarGonk and FooGonk is What is the most Pythonic, DRY-adherent, and preferably least-ugly -- You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.
| ||||||||||||||