Message173389
> 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. |
|
Date |
User |
Action |
Args |
2012-10-20 12:41:13 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, mark.dickinson |
2012-10-20 12:41:13 | serhiy.storchaka | link | issue16290 messages |
2012-10-20 12:41:13 | serhiy.storchaka | create | |
|