summaryrefslogtreecommitdiffstats
path: root/Doc/c-api/float.rst
diff options
context:
space:
mode:
authorAntoine Pitrou <solipsis@pitrou.net>2011-12-18 00:25:27 (GMT)
committerAntoine Pitrou <solipsis@pitrou.net>2011-12-18 00:25:27 (GMT)
commit07b1c877b2d07d39405184cde7d60ccf048e6d1d (patch)
tree0046e7e07c768a77192218692f0ebaf2fc7402bb /Doc/c-api/float.rst
parentbb2e9c477d1cfb24f20ff979584af8fdb7b67a57 (diff)
downloadcpython-07b1c877b2d07d39405184cde7d60ccf048e6d1d.zip
cpython-07b1c877b2d07d39405184cde7d60ccf048e6d1d.tar.gz
cpython-07b1c877b2d07d39405184cde7d60ccf048e6d1d.tar.bz2
Issue #13522: document error return values of some float and complex C API functions.
Diffstat (limited to 'Doc/c-api/float.rst')
-rw-r--r--Doc/c-api/float.rst2
1 files changed, 2 insertions, 0 deletions
diff --git a/Doc/c-api/float.rst b/Doc/c-api/float.rst
index 757efd3..27a75e3 100644
--- a/Doc/c-api/float.rst
+++ b/Doc/c-api/float.rst
@@ -47,6 +47,8 @@ Floating Point Objects
Return a C :c:type:`double` representation of the contents of *pyfloat*. If
*pyfloat* is not a Python floating point object but has a :meth:`__float__`
method, this method will first be called to convert *pyfloat* into a float.
+ This method returns ``-1.0`` upon failure, so one should call
+ :c:func:`PyErr_Occurred` to check for errors.
.. c:function:: double PyFloat_AS_DOUBLE(PyObject *pyfloat)