diff options
author | R David Murray <rdmurray@bitdance.com> | 2015-04-13 01:51:36 (GMT) |
---|---|---|
committer | R David Murray <rdmurray@bitdance.com> | 2015-04-13 01:51:36 (GMT) |
commit | 354c7403c52cc7e46a69c5556107745e5ec91720 (patch) | |
tree | fabb193596debc6acc7728025162b0aca634449b /Doc | |
parent | 9575e1891ff533318f6dd72ab6f6bd0f9a042014 (diff) | |
download | cpython-354c7403c52cc7e46a69c5556107745e5ec91720.zip cpython-354c7403c52cc7e46a69c5556107745e5ec91720.tar.gz cpython-354c7403c52cc7e46a69c5556107745e5ec91720.tar.bz2 |
#17380: Document tp_init return value in extending docs.
Patch by James Powell.
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/extending/newtypes.rst | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/Doc/extending/newtypes.rst b/Doc/extending/newtypes.rst index d520702..aaa37b8 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 |