Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit e37b4ed

Browse files
committed
Discuss calling new-style types.
Closes SF bug #453683.
1 parent 42d9016 commit e37b4ed

1 file changed

Lines changed: 9 additions & 1 deletion

File tree

Doc/ref/ref3.tex

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -580,7 +580,15 @@ \section{The standard type hierarchy\label{types}}
580580
\obindex{method}
581581
\indexii{built-in}{method}
582582

583-
\item[Classes]
583+
\item[Class Types]
584+
Class types, or ``new-style classes,'' are callable. These objects
585+
normally act as factories for new instances of themselves, but
586+
variations are possible for class types that override
587+
\method{__new__()}. The arguments of the call are passed to
588+
\method{__new__()} and, in the typical case, to \method{__init__()} to
589+
initialize the new instance.
590+
591+
\item[Classic Classes]
584592
Class objects are described below. When a class object is called,
585593
a new class instance (also described below) is created and
586594
returned. This implies a call to the class's \method{__init__()} method

0 commit comments

Comments
 (0)