Roundup Robot added the comment:
New changeset c6dc1e0db7f0 by R David Murray in branch '3.4':
#17380: Document tp_init return value in extending docs.
https://hg.python.org/cpython/rev/c6dc1e0db7f0
New changeset d74ede4bbf81 by R David Murray in branch 'default':
Merge: #17380: Document
R. David Murray added the comment:
Thanks, James.
--
resolution: - fixed
stage: - resolved
status: open - closed
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17380
___
James Powell added the comment:
See attached patch to clarify this in the docs.
--
keywords: +patch
Added file: http://bugs.python.org/file38910/issue_17380.patch
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17380
Changes by James Powell ja...@dontusethiscode.com:
--
nosy: +james
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17380
___
___
Python-bugs-list
Changes by James Powell ja...@dontusethiscode.com:
--
nosy: +r.david.murray
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17380
___
___
Changes by A.M. Kuchling a...@amk.ca:
--
keywords: +easy
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17380
___
___
Python-bugs-list mailing list
Amaury Forgeot d'Arc added the comment:
Note that all these cases are compatible with tp_init returns 0 on success and
-1 on error.
--
___
Python tracker rep...@bugs.python.org
http://bugs.python.org/issue17380
Amaury Forgeot d'Arc added the comment:
The return value for error conditions should be -1.
- typeobject.c checks with 0
- in _iomodule.c, there is == -1
- and pygobject/gobject/gobjectmodule.c just does::
if (...tp_init(...))
PyErr_Print();
--
nosy: +amaury.forgeotdarc
Zbyszek Jędrzejewski-Szmek added the comment:
On Fri, Mar 08, 2013 at 02:30:18PM +, Amaury Forgeot d'Arc wrote:
Amaury Forgeot d'Arc added the comment:
The return value for error conditions should be -1.
- typeobject.c checks with 0
- in _iomodule.c, there is == -1
- and
New submission from Zbyszek Jędrzejewski-Szmek:
initproc is declared to return an int, but what returned values mean is not
documented. Noddy_init in
http://docs.python.org/3/extending/newtypes.html?highlight=initproc#adding-data-and-methods-to-the-basic-example
can be seen to return 0 on
10 matches
Mail list logo