Commit 354c7403 authored by R David Murray's avatar R David Murray

#17380: Document tp_init return value in extending docs.

Patch by James Powell.
parent 9575e189
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment