Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
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, asPyComplex_
is a prefix for functions, operating withPyObject*
arguments. Perhaps, rather we could instead usePy_complex_add()
andPy_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/