[docs] [issue13522] Document error return values for PyFloat_* and PyComplex_*

Stefan Krah report at bugs.python.org
Sat Dec 3 14:25:52 CET 2011


Stefan Krah <stefan-usenet at bytereef.org> added the comment:

Good point. - I just had to figure out if the pattern

    Py_complex c = PyComplex_AsCComplex(w);
    if (c.real == -1.0 && PyErr_Occurred()) {
        ...

will always be reliable in the future. The source of PyComplex_AsCComplex()
suggests that it will, on the other hand in getargs.c the pattern isn't
used.

The passage you quoted is quite clear, so I wouldn't mind if you
close this.

I'm not sure how many people read that passage though. :)

----------

_______________________________________
Python tracker <report at bugs.python.org>
<http://bugs.python.org/issue13522>
_______________________________________


More information about the docs mailing list