R. David Murray <rdmur...@bitdance.com> added the comment:

What is happening here is that when __doc__ is looked up, it is found
first among the attributes of the class type.  __doc__ is special, and
types define it to be None if it not set to anything specific.  So the
docstring for an instance of a subclass of property is None, or the
docstring of the subclass if one is provided.  The other property
attributes aren't affected since they aren't "special" attributes on
types, and so get looked up on the base class as expected.

I believe the fix is to have property's __init__ check to see if it is
dealing with a subclass, and if so to insert the __doc__ string into the
instance's __dict__.

Patch attached.  Needs review, especially since I'm new to internals stuff.

----------
assignee:  -> r.david.murray
components: +Interpreter Core
keywords: +needs review, patch
nosy: +r.david.murray
priority:  -> normal
stage:  -> patch review
versions: +Python 2.6, Python 2.7, Python 3.0, Python 3.1
Added file: http://bugs.python.org/file13831/issue5890.patch

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue5890>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to