[Python-Dev] return type of complex (original) (raw)
Christian Heimes christian at python.org
Fri Oct 19 18:31:31 CEST 2012
- Previous message: [Python-Dev] return type of __complex__
- Next message: [Python-Dev] return type of __complex__
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Am 19.10.2012 18:23, schrieb Maciej Fijalkowski:
Nick just said it's a bug that cmath type checks are too strict.
I'm not so sure about that. cmath just uses PyArg_ParseTuple with "D" which itself relies upon PyComplex_AsCComplex().
D (complex) [Py_complex] Convert a Python complex number to a C Py_complex structure.
In order to fix the bug the code in PyComplex_AsCComplex() must be altered to support float as return type from complex(). That's a major change.
Christian
- Previous message: [Python-Dev] return type of __complex__
- Next message: [Python-Dev] return type of __complex__
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]