[docs] PyModule_GetDict() claims it can never fail, but it can (issue 12946)
stephane at wirtel.be
stephane at wirtel.be
Sun Aug 7 03:40:06 EDT 2016
http://bugs.python.org/review/12946/diff/18078/Doc/c-api/module.rst
File Doc/c-api/module.rst (right):
http://bugs.python.org/review/12946/diff/18078/Doc/c-api/module.rst#newcode64
Doc/c-api/module.rst:64: :exc:`SystemError` is raised and *NULL* is
returned.
ok in this case, sorry, I was on my phone and not on my laptop for the
review.
thanks for the copy/paste. I have checked the code.
On 2016/08/06 17:34:30, berkerpeksag wrote:
> On 2016/08/06 15:47:10, matrixise wrote:
> > The assert will raise a SystemError ?
>
> No, the following branch will raise SystemError:
>
> if (!PyModule_Check(m)) {
> PyErr_BadInternalCall();
> return NULL;
> }
>
> I added the assert statement as a sanity check.
Done.
http://bugs.python.org/review/12946/
More information about the docs
mailing list