Index: Objects/descrobject.c =================================================================== --- Objects/descrobject.c (revision 76221) +++ Objects/descrobject.c (working copy) @@ -1284,18 +1284,17 @@ if (Py_TYPE(self) == &PyProperty_Type) { Py_XDECREF(prop->prop_doc); prop->prop_doc = get_doc; + prop->getter_doc = 1; } 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. */ - int err = PyObject_SetAttrString(self, "__doc__", get_doc); + if (PyObject_SetAttrString(self, "__doc__", get_doc) >= 0) + prop->getter_doc = 1; Py_DECREF(get_doc); - if (err < 0) - return -1; } - prop->getter_doc = 1; } else if (PyErr_ExceptionMatches(PyExc_Exception)) { PyErr_Clear();