Author r.david.murray
Recipients gsakkis, r.david.murray
Date 2009-05-01.21:53:16
SpamBayes Score 7.61879e-09
Marked as misclassified No
Message-id <1241214798.77.0.828289123146.issue5890@psf.upfronthosting.co.za>
In-reply-to
Content
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.
History
Date User Action Args
2009-05-01 21:53:18r.david.murraysetrecipients: + r.david.murray, gsakkis
2009-05-01 21:53:18r.david.murraysetmessageid: <1241214798.77.0.828289123146.issue5890@psf.upfronthosting.co.za>
2009-05-01 21:53:17r.david.murraylinkissue5890 messages
2009-05-01 21:53:16r.david.murraycreate