From: Georg Brandl Date: Fri, 5 Dec 2008 08:06:57 +0000 (+0000) Subject: Add an index entry for "subclassing immutable types". X-Git-Tag: v2.7a1~2583 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=3fc42260574d5711cdb2cdd1c35b9da442abd53b;p=python Add an index entry for "subclassing immutable types". --- diff --git a/Doc/reference/datamodel.rst b/Doc/reference/datamodel.rst index 7304c9c385..4dcc96f6a6 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