Message86918
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. |
|
Date |
User |
Action |
Args |
2009-05-01 21:53:18 | r.david.murray | set | recipients:
+ r.david.murray, gsakkis |
2009-05-01 21:53:18 | r.david.murray | set | messageid: <1241214798.77.0.828289123146.issue5890@psf.upfronthosting.co.za> |
2009-05-01 21:53:17 | r.david.murray | link | issue5890 messages |
2009-05-01 21:53:16 | r.david.murray | create | |
|