Thanks for these hints!  I'm afraid that I still have to go with Jeroen's 
solution, because I'd like to have different descriptions of the class, 
only what's displayed as "Init docstring" should be kept.

It's actually strange that non-present docstrings of methods which are 
overwritten are not taken from the parent class.

Martin

Am Montag, 7. November 2016 16:04:07 UTC+1 schrieb Travis Scrimshaw:
>
>
>
> 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