Serhiy Storchaka added the comment:

> My interpretation of that is that __int__ should return an int, __float__ a
> float, __complex__ a complex number; 

It's a reasonable interpretation. Changing it can be confusing.

On the other hand, int and float look like specialized subclasses of complex 
(they even have .real, .imag and .conjugate()). The ducktype principle 
requires that we can use ints or floats everywhere where complexes needed. This 
means that you should add a branch for integers too.

----------

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue16290>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to