[Python-checkins] cpython (merge 3.4 -> default): Merge: #17380: Document tp_init return value in extending docs.

r.david.murray python-checkins at python.org
Mon Apr 13 03:54:06 CEST 2015


https://hg.python.org/cpython/rev/d74ede4bbf81
changeset:   95562:d74ede4bbf81
parent:      95559:2a18f6b85da2
parent:      95561:c6dc1e0db7f0
user:        R David Murray <rdmurray at bitdance.com>
date:        Sun Apr 12 21:52:12 2015 -0400
summary:
  Merge: #17380: Document tp_init return value in extending docs.

files:
  Doc/extending/newtypes.rst |  3 ++-
  1 files changed, 2 insertions(+), 1 deletions(-)


diff --git a/Doc/extending/newtypes.rst b/Doc/extending/newtypes.rst
--- a/Doc/extending/newtypes.rst
+++ b/Doc/extending/newtypes.rst
@@ -383,7 +383,8 @@
 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

-- 
Repository URL: https://hg.python.org/cpython


More information about the Python-checkins mailing list