On Monday, November 7, 2016 at 7:26:57 AM UTC-6, Jeroen Demeyer wrote:
>
> On 2016-11-07 14:13, 'Martin R' via sage-devel wrote: 
> > I would like that these subclasses inherit the docstring of 
> > GrowthDiagram.__init__ (and a few other methods), but I do not know how 
> > to achieve this. 
>
> sage: class B(A): 
> ....:     def __init__(self): 
> ....:         pass 
> ....:     __init__.__doc__ = A.__init__.__doc__ 
>
>
IIRC, another option would be to put it in the class-level doc, which is 
automatically passed down provided the subclass doesn't do its own 
class-level doc.
 

-- 
You received this message because you are subscribed to the Google Groups 
"sage-devel" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to sage-devel+unsubscr...@googlegroups.com.
To post to this group, send email to sage-devel@googlegroups.com.
Visit this group at https://groups.google.com/group/sage-devel.
For more options, visit https://groups.google.com/d/optout.

Reply via email to