#if defined(Py_BUILD_CORE) && !defined(Py_BUILD_CORE_MODULE)
# include "pycore_gc.h"
# include "pycore_runtime.h"
#endif
#include "pycore_modsupport.h"
PyDoc_STRVAR(complex_conjugate__doc__,
"conjugate($self, /)\n"
"--\n"
"\n"
"Return the complex conjugate of its argument. (3-4j).conjugate() == 3+4j.");
#define COMPLEX_CONJUGATE_METHODDEF …
static PyObject *
complex_conjugate_impl(PyComplexObject *self);
static PyObject *
complex_conjugate(PyComplexObject *self, PyObject *Py_UNUSED(ignored))
{ … }
PyDoc_STRVAR(complex___getnewargs____doc__,
"__getnewargs__($self, /)\n"
"--\n"
"\n");
#define COMPLEX___GETNEWARGS___METHODDEF …
static PyObject *
complex___getnewargs___impl(PyComplexObject *self);
static PyObject *
complex___getnewargs__(PyComplexObject *self, PyObject *Py_UNUSED(ignored))
{ … }
PyDoc_STRVAR(complex___format____doc__,
"__format__($self, format_spec, /)\n"
"--\n"
"\n"
"Convert to a string according to format_spec.");
#define COMPLEX___FORMAT___METHODDEF …
static PyObject *
complex___format___impl(PyComplexObject *self, PyObject *format_spec);
static PyObject *
complex___format__(PyComplexObject *self, PyObject *arg)
{ … }
PyDoc_STRVAR(complex___complex____doc__,
"__complex__($self, /)\n"
"--\n"
"\n"
"Convert this value to exact type complex.");
#define COMPLEX___COMPLEX___METHODDEF …
static PyObject *
complex___complex___impl(PyComplexObject *self);
static PyObject *
complex___complex__(PyComplexObject *self, PyObject *Py_UNUSED(ignored))
{ … }
PyDoc_STRVAR(complex_new__doc__,
"complex(real=0, imag=0)\n"
"--\n"
"\n"
"Create a complex number from a string or numbers.\n"
"\n"
"If a string is given, parse it as a complex number.\n"
"If a single number is given, convert it to a complex number.\n"
"If the \'real\' or \'imag\' arguments are given, create a complex number\n"
"with the specified real and imaginary components.");
static PyObject *
complex_new_impl(PyTypeObject *type, PyObject *r, PyObject *i);
static PyObject *
complex_new(PyTypeObject *type, PyObject *args, PyObject *kwargs)
{ … }
PyDoc_STRVAR(complex_from_number__doc__,
"from_number($type, number, /)\n"
"--\n"
"\n"
"Convert number to a complex floating-point number.");
#define COMPLEX_FROM_NUMBER_METHODDEF …