From 3fc42260574d5711cdb2cdd1c35b9da442abd53b Mon Sep 17 00:00:00 2001 From: Georg Brandl Date: Fri, 5 Dec 2008 08:06:57 +0000 Subject: [PATCH] Add an index entry for "subclassing immutable types". --- Doc/reference/datamodel.rst | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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 -- 2.50.1