summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorR David Murray <rdmurray@bitdance.com>2015-04-12 21:51:36 -0400
committerR David Murray <rdmurray@bitdance.com>2015-04-12 21:51:36 -0400
commit2db2f4278514f9eab4d44220768b6ae360345817 (patch)
treeb6e39fe5196e1f500eb1e6732aff91354e095e7e
parent897fd72a9006b686cccfcc6964e113dd4c0942f3 (diff)
downloadcpython-2db2f4278514f9eab4d44220768b6ae360345817.tar.gz
#17380: Document tp_init return value in extending docs.
Patch by James Powell.
-rw-r--r--Doc/extending/newtypes.rst3
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/extending/newtypes.rst b/Doc/extending/newtypes.rst
index d52070221e..aaa37b8324 100644
--- a/Doc/extending/newtypes.rst
+++ b/Doc/extending/newtypes.rst
@@ -383,7 +383,8 @@ is used to initialize an object after it's created. Unlike the new method, we
can't guarantee that the initializer is called. The initializer isn't called
when unpickling objects and it can be overridden. Our initializer accepts
arguments to provide initial values for our instance. Initializers always accept
-positional and keyword arguments.
+positional and keyword arguments. Initializers should return either 0 on
+success or -1 on error.
Initializers can be called multiple times. Anyone can call the :meth:`__init__`
method on our objects. For this reason, we have to be extra careful when