diff -r ab4432daf69f Doc/library/functions.rst --- a/Doc/library/functions.rst Mon Oct 22 21:50:27 2012 -0700 +++ b/Doc/library/functions.rst Tue Oct 23 14:37:55 2012 +0300 @@ -1323,23 +1323,19 @@ .. function:: type(object) + type(name, bases, dict) .. index:: object: type - Return the type of an *object*. The return value is a type object and + + With one argument, return the type of an *object*. The return value is a type object and generally the same object as returned by ``object.__class__``. The :func:`isinstance` built-in function is recommended for testing the type of an object, because it takes subclasses into account. - With three arguments, :func:`type` functions as a constructor as detailed - below. - -.. function:: type(name, bases, dict) - :noindex: - - Return a new type object. This is essentially a dynamic form of the + With three arguments, return a new type object. This is essentially a dynamic form of the :keyword:`class` statement. The *name* string is the class name and becomes the :attr:`__name__` attribute; the *bases* tuple itemizes the base classes and becomes the :attr:`__bases__` attribute; and the *dict* dictionary is the