diff -ur Python-2.6.4~/Objects/descrobject.c Python-2.6.4/Objects/descrobject.c --- Python-2.6.4~/Objects/descrobject.c 2009-09-28 01:17:37.000000000 +0900 +++ Python-2.6.4/Objects/descrobject.c 2009-11-12 11:14:54.000000000 +0900 @@ -1285,18 +1285,17 @@ if (Py_TYPE(self)==&PyProperty_Type) { Py_XDECREF(prop->prop_doc); prop->prop_doc = get_doc; - } else { + prop->getter_doc = 1; + } + else { /* Put __doc__ in dict of the subclass instance instead, otherwise it gets shadowed by class's __doc__. */ - if (PyObject_SetAttrString(self, "__doc__", get_doc) != 0) - { - /* DECREF for props handled by _dealloc */ - Py_DECREF(get_doc); - return -1; - } - Py_DECREF(get_doc); + if (PyObject_SetAttrString(self, "__doc__", get_doc) >= 0) + prop->getter_doc = 1; + PyErr_Clear(); + /* DECREF for props handled by _dealloc */ + Py_DECREF(get_doc); } - prop->getter_doc = 1; } else { PyErr_Clear(); }