Override a method but inherit the docstring

Aahz aahz at pythoncraft.com
Sun Jul 26 11:55:18 EDT 2009


In article <056f629b-aa63-458a-ae16-ac40a759e446 at h11g2000yqb.googlegroups.com>,
Shai  <shai at platonix.com> wrote:
>
>class DocInherit(object):
>    """
>    Docstring inheriting method descriptor
>
>    The class itself is also used as a decorator
>    """

Nice!  Maybe stick this on the Cookbook?
-- 
Aahz (aahz at pythoncraft.com)           <*>         http://www.pythoncraft.com/

"At Resolver we've found it useful to short-circuit any doubt and just        
refer to comments in code as 'lies'. :-)"
--Michael Foord paraphrases Christian Muirhead on python-dev, 2009-03-22



More information about the Python-list mailing list