[Python-Dev] return type of complex (original) (raw)
Mark Dickinson dickinsm at gmail.com
Fri Oct 19 18:41:25 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 ]
On Fri, Oct 19, 2012 at 5:31 PM, Christian Heimes <christian at python.org> wrote:
In order to fix the bug the code in PyComplexAsCComplex() must be altered to support float as return type from complex(). That's a major change.
Agreed that this doesn't seem appropriate for bugfix releases.
We might also want to consider having PyComplex_AsCComplex check for float, again for consistency with the 'complex' constructor:
class A(object): ... def float(self): ... return 42.0 ... a = A() float(a) 42.0 complex(a) (42+0j)
Mark
- Previous message: [Python-Dev] return type of __complex__
- Next message: [Python-Dev] return type of __complex__
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]