Description
Proposal:
Suggested by @vstinner in #124829 (comment).
I would agree, as these routines could be useful (and it seems, they are used by few projects) to implement mathematical functions just like in the cmath module. No alternatives exist.
It's also suggested to use a different convention for arguments: currently we pass them by value. We could use pointers to Py_complex struct instead. (Though my quick tests shows no measurable difference.)
Also, we should decide on naming. For _Py_c_sum() - PyComplex_Add() was suggested. But this looks misleading, as PyComplex_ is a prefix for functions, operating with PyObject* arguments. Perhaps, rather we could instead use Py_complex_add() and Py_complex_add_real() (in the GNU GSL style). Current semi-private functions should be deprecated.
Previous discussions:
- _Py_c_sum, _Py_c_diff, etc - were removed from Python.h #112019
- C API: Remove private C API functions (move them to the internal C API) #106320 (comment)
Other:
- Remove public low-level API functions for Py_complex? capi-workgroup/decisions#56
- https://discuss.python.org/t/89919/

Formed in 2009, the Archive Team (not to be confused with the archive.org Archive-It Team) is a rogue archivist collective dedicated to saving copies of rapidly dying or deleted websites for the sake of history and digital heritage. The group is 100% composed of volunteers and interested parties, and has expanded into a large amount of related projects for saving online and digital history.
