mirror of https://github.com/python/cpython
Add an index entry for "subclassing immutable types".
This commit is contained in:
parent
0c880bd4fb
commit
3fc4226057
|
@ -1162,9 +1162,10 @@ of this is the :class:`NodeList` interface in the W3C's Document Object Model.)
|
|||
Basic customization
|
||||
-------------------
|
||||
|
||||
|
||||
.. method:: object.__new__(cls[, ...])
|
||||
|
||||
.. index:: pair: subclassing; immutable types
|
||||
|
||||
Called to create a new instance of class *cls*. :meth:`__new__` is a static
|
||||
method (special-cased so you need not declare it as such) that takes the class
|
||||
of which an instance was requested as its first argument. The remaining
|
||||
|
|
Loading…
Reference in New Issue