if (Py_IS_TYPE(self, &PyProperty_Type)) {
Py_XSETREF(self->prop_doc, prop_doc);
} else {
/* If this is a property subclass, put __doc__
in dict of the subclass instance instead,
otherwise it gets shadowed by __doc__ in the
class's dict. */
/*...*/
PyObject_SetAttr((PyObject *)self, &_Py_ID(__doc__), prop_doc);
/*...*/
}
I don't see a good way to fix this. We could: