]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Discuss calling new-style types.
authorFred Drake <fdrake@acm.org>
Tue, 15 Jul 2003 20:45:16 +0000 (20:45 +0000)
committerFred Drake <fdrake@acm.org>
Tue, 15 Jul 2003 20:45:16 +0000 (20:45 +0000)
Closes SF bug #453683.

Doc/ref/ref3.tex

index 129ab091fe181682a871805eccdabb1e75450704..167d885465ecc9d9a04da3e7730a5896865931f3 100644 (file)
@@ -580,7 +580,15 @@ to the object denoted by \var{list}.
 \obindex{method}
 \indexii{built-in}{method}
 
-\item[Classes]
+\item[Class Types]
+Class types, or ``new-style classes,'' are callable.  These objects
+normally act as factories for new instances of themselves, but
+variations are possible for class types that override
+\method{__new__()}.  The arguments of the call are passed to
+\method{__new__()} and, in the typical case, to \method{__init__()} to
+initialize the new instance.
+
+\item[Classic Classes]
 Class objects are described below.  When a class object is called,
 a new class instance (also described below) is created and
 returned.  This implies a call to the class's \method{__init__()} method