[Python-Dev] return type of __complex__
Mark Dickinson
dickinsm at gmail.com
Sat Oct 20 11:41:24 CEST 2012
More information about the Python-Dev mailing list
Sat Oct 20 11:41:24 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 3:13 PM, Nick Coghlan <ncoghlan at gmail.com> wrote: > Given the way complex numbers interact with floats generally, > returning a complex number with no imaginary component as a floating > point value seems legitimate and the checks in cmath overly strict. > Otherwise you would get redundancy like: > > def __complex__(self): > return complex(value) > > or > > def __complex__(self): > return value + 0j I've opened bugs.python.org/issue16290 to track this. -- Mark
- Previous message: [Python-Dev] return type of __complex__
- Next message: [Python-Dev] return type of __complex__
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
More information about the Python-Dev mailing list