Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cpython
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
cpython
Commits
07b1c877
Commit
07b1c877
authored
Dec 18, 2011
by
Antoine Pitrou
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Issue #13522: document error return values of some float and complex C API functions.
parent
bb2e9c47
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
10 additions
and
1 deletion
+10
-1
Doc/c-api/complex.rst
Doc/c-api/complex.rst
+7
-1
Doc/c-api/float.rst
Doc/c-api/float.rst
+2
-0
Misc/ACKS
Misc/ACKS
+1
-0
No files found.
Doc/c-api/complex.rst
View file @
07b1c877
...
...
@@ -63,12 +63,18 @@ pointers. This is consistent throughout the API.
Return the quotient of two complex numbers, using the C :c:type:`Py_complex`
representation.
If *divisor* is null, this method returns zero and sets
:c:data:`errno` to :c:data:`EDOM`.
.. c:function:: Py_complex _Py_c_pow(Py_complex num, Py_complex exp)
Return the exponentiation of *num* by *exp*, using the C :c:type:`Py_complex`
representation.
If :attr:`exp.imag` is not null, or :attr:`exp.real` is negative,
this method returns zero and sets :c:data:`errno` to :c:data:`EDOM`.
Complex Numbers as Python Objects
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
...
...
@@ -123,4 +129,4 @@ Complex Numbers as Python Objects
If *op* is not a Python complex number object but has a :meth:`__complex__`
method, this method will first be called to convert *op* to a Python complex
number object.
number object.
Upon failure, this method returns ``-1.0`` as a real value.
Doc/c-api/float.rst
View file @
07b1c877
...
...
@@ -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)
...
...
Misc/ACKS
View file @
07b1c877
...
...
@@ -139,6 +139,7 @@ Tarn Weisner Burton
Lee Busby
Ralph Butler
Jp Calderone
Arnaud Calmettes
Daniel Calvelo
Tony Campbell
Brett Cannon
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment