Account Options

  1. Sign in
The old Google Groups will be going away soon, but your browser is incompatible with the new version.
Google Groups Home
« Groups Home
Message from discussion Override a method but inherit the docstring
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
 
From:
To:
Cc:
Followup To:
Add Cc | Add Followup-to | Edit Subject
Subject:
Validation:
For verification purposes please type the characters you see in the picture below or the numbers you hear by clicking the accessibility icon. Listen and type the numbers you hear
 
Jean-Michel Pichavant  
View profile  
 More options Jul 28 2009, 5:33 am
Newsgroups: comp.lang.python
From: Jean-Michel Pichavant <jeanmic...@sequans.com>
Date: Tue, 28 Jul 2009 11:33:43 +0200
Local: Tues, Jul 28 2009 5:33 am
Subject: Re: Override a method but inherit the docstring
Shai wrote:
> On Jul 27, 5:05 pm, Jean-Michel Pichavant <jeanmic...@sequans.com>
> wrote:

>> Ben Finney wrote:

>>> The docstring for FooGonk.frobnicate is, intentionally, perfectly
>>> applicable to the BarGonk.frobnicate method also. Yet in overriding
>>> the method, the original docstring is not associated with it.

>> I've also tried within the python interpreter, and it can perfectly
>> solve docstring inheritance. So why would you explicitly assign
>> docstring to child methods ?

> What do you mean by "can perfectly solve docstring inheritance" ?

> After the following,

> class Foo(object):
>     def foo(self):
>         "Frobber"
>         pass

> class Bar(Foo):
>     def foo(self):
>         pass

> help(Bar.foo) does not display "Frobber" on my interpreter.

You're right. I must have made some dumb mistake. So interpreters do not
solve docstring inheritance, Epydoc does.

JM


 
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.