~ubuntu-branches/ubuntu/precise/python3.2/precise-proposed

« back to all changes in this revision

Viewing changes to Doc/c-api/complex.rst

  • Committer: Package Import Robot
  • Author(s): Matthias Klose
  • Date: 2012-03-09 18:40:39 UTC
  • mfrom: (30.1.2 sid)
  • Revision ID: package-import@ubuntu.com-20120309184039-j3yk2emxr1plyo21
Tags: 3.2.3~rc1-1
* Python 3.2.3 release candidate 1.
* Update to 20120309 from the 3.2 branch.
* Fix libpython.a symlink. Closes: #660146.
* Build-depend on xauth.
* Run the gdb tests for the debug build only.

Show diffs side-by-side

added added

removed removed

Lines of Context:
63
63
   Return the quotient of two complex numbers, using the C :c:type:`Py_complex`
64
64
   representation.
65
65
 
 
66
   If *divisor* is null, this method returns zero and sets
 
67
   :c:data:`errno` to :c:data:`EDOM`.
 
68
 
66
69
 
67
70
.. c:function:: Py_complex _Py_c_pow(Py_complex num, Py_complex exp)
68
71
 
69
72
   Return the exponentiation of *num* by *exp*, using the C :c:type:`Py_complex`
70
73
   representation.
71
74
 
 
75
   If *num* is null and *exp* is not a positive real number,
 
76
   this method returns zero and sets :c:data:`errno` to :c:data:`EDOM`.
 
77
 
72
78
 
73
79
Complex Numbers as Python Objects
74
80
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
123
129
 
124
130
   If *op* is not a Python complex number object but has a :meth:`__complex__`
125
131
   method, this method will first be called to convert *op* to a Python complex
126
 
   number object.
 
132
   number object. Upon failure, this method returns ``-1.0`` as a real value.