[Python-Dev] return type of complex (original) (raw)
Greg Ewing greg.ewing at canterbury.ac.nz
Sat Oct 20 07:06:42 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 ]
Stephen J. Turnbull wrote:
It's a design bug, yes. The question is, does it conform to documented behavior?
The 2.7 docs say this about complex:
Called to implement the built-in function complex() ...
Should return a value of the appropriate type.
So the question is whether float is an "appropriate type" when you're expecting a complex.
-- Greg
- Previous message: [Python-Dev] return type of __complex__
- Next message: [Python-Dev] return type of __complex__
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]