[Python-Dev] readonly __doc__

ssteinerX@gmail.com ssteinerx at gmail.com
Thu Oct 22 21:48:36 CEST 2009

On Oct 22, 2009, at 2:39 PM, Brett Cannon wrote:

> On Thu, Oct 22, 2009 at 11:18, ssteinerX at gmail.com <ssteinerx at gmail.com 
> > wrote:
> On Oct 22, 2009, at 1:58 PM, Guido van Rossum wrote:
> Well __doc__ isn't a normal attribute -- it doesn't follow  
> inheritance rules.
> Maybe we could add a ticket to flag this in the docs.
> Sure, go for it.

Filed: http://bugs.python.org/issue7186

> Is __doc__ not normal due to its general underscorishness, or is it  
> not normal because it isn't?
> I honestly don't follow that sentence.

It means, is it special because it's a "special" i.e. __X__ type  
attribute or because of something special about __doc__ itself,  
independent of it being a "special attribute".

> But __doc__ is special because of its use; documenting how to use of  
> an object. In this case when you call something like help() on an  
> instance of an object it skips the instance's value for __doc__ and  
> goes straight to the defining class and stops there as you don't  
> care how a subclass says to use itself as that is not what you are  
> working with.
> Any others that deserve special notice, while we're at it?
> Don't know.

Ok, issue recorded.



-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-dev/attachments/20091022/2a7823cc/attachment.htm>

More information about the Python-Dev mailing list