Re: docstring inheritance

2010-12-01 Thread HughSW
G, sorry about the line wrapping horror; trying again. class InheritDoc(object): """ Docstring inheriting method descriptor The class itself is used as a decorator that creates a class property for the method; the first time the property is used it installs the method's doc

docstring inheritance

2010-12-01 Thread HughSW
We've been trying to find an easy way to inherit docstrings when overriding methods in subclasses, e.g. so that Sphinx does a nice job. We used Shai's DocInherit code from this post: http://groups.google.com/group/comp.lang.python/tree/browse_frm/thread/1e4075ba10dcbdd9/f63651cd9e76df63?rnum=1&_d