Merged revisions 86670 via svnmerge from
svn+ssh://pythondev@svn.python.org/python/branches/py3k
........
r86670 | eric.araujo | 2010-11-22 04:09:19 +0100 (lun., 22 nov. 2010) | 5 lines
Remove unnecessary `object` base class in docs (#10366).
Also add a note about inheritance from `object` being default.
........
diff --git a/Doc/reference/compound_stmts.rst b/Doc/reference/compound_stmts.rst
index 5582cf6..f5d919a 100644
--- a/Doc/reference/compound_stmts.rst
+++ b/Doc/reference/compound_stmts.rst
@@ -560,7 +560,16 @@
A class definition is an executable statement. The inheritance list usually
gives a list of base classes (see :ref:`metaclasses` for more advanced uses), so
each item in the list should evaluate to a class object which allows
-subclassing.
+subclassing. Classes without an inheritance list inherit, by default, from the
+base class :class:`object`; hence, ::
+
+ class Foo:
+ pass
+
+is equivalent to ::
+
+ class Foo(object):
+ pass
The class's suite is then executed in a new execution frame (see :ref:`naming`),
using a newly created local namespace and the original global namespace.