On Fri, Oct 19, 2012 at 3:13 PM, Nick Coghlan <ncogh...@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 _______________________________________________ Python-Dev mailing list Python-Dev@python.org http://mail.python.org/mailman/listinfo/python-dev Unsubscribe: http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com