summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorGeorg Brandl <georg@python.org>2008-12-05 08:06:57 (GMT)
committerGeorg Brandl <georg@python.org>2008-12-05 08:06:57 (GMT)
commit3fc42260574d5711cdb2cdd1c35b9da442abd53b (patch)
tree886fd9e49ee374f28cac2391d4f470345bc60d23 /Doc
parent0c880bd4fb491effac842f2e6b136bf735e40b6f (diff)
downloadcpython-3fc42260574d5711cdb2cdd1c35b9da442abd53b.zip
cpython-3fc42260574d5711cdb2cdd1c35b9da442abd53b.tar.gz
cpython-3fc42260574d5711cdb2cdd1c35b9da442abd53b.tar.bz2
Add an index entry for "subclassing immutable types".
Diffstat (limited to 'Doc')
-rw-r--r--Doc/reference/datamodel.rst3
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst
index 7304c9c..4dcc96f 100644
--- a/Doc/reference/datamodel.rst
+++ b/Doc/reference/datamodel.rst
@@ -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