thisclass = attrs[0][2]
attrs, inherited = _split_list(attrs, lambda t: t[2] is thisclass)
- if thisclass is builtins.object:
+ if object is not builtins.object and thisclass is builtins.object:
attrs = inherited
continue
elif thisclass is object:
thisclass = attrs[0][2]
attrs, inherited = _split_list(attrs, lambda t: t[2] is thisclass)
- if thisclass is builtins.object:
+ if object is not builtins.object and thisclass is builtins.object:
attrs = inherited
continue
elif thisclass is object:
--- /dev/null
+Expand object.__doc__ (docstring) to make it clearer.
+Modify pydoc.py so that help(object) lists object methods
+(for other classes, help omits methods of the object base class.)
{0}
};
+PyDoc_STRVAR(object_doc,
+"object()\n--\n\n"
+"The base class of the class hierarchy.\n\n"
+"When called, it accepts no arguments and returns a new featureless\n"
+"instance that has no instance attributes and cannot be given any.\n");
PyTypeObject PyBaseObject_Type = {
PyVarObject_HEAD_INIT(&PyType_Type, 0)
PyObject_GenericSetAttr, /* tp_setattro */
0, /* tp_as_buffer */
Py_TPFLAGS_DEFAULT | Py_TPFLAGS_BASETYPE, /* tp_flags */
- PyDoc_STR("object()\n--\n\nThe most base type"), /* tp_doc */
+ object_doc, /* tp_doc */
0, /* tp_traverse */
0, /* tp_clear */
object_richcompare, /* tp_richcompare */