Message393706
Maybe some methods from the Complex class could be moved to the Number class?
I think, that something like the ring structure (probably even a commutative ring) is expected from the number classes in the Python. I.e. there should be __add__/__sub__/__mul__/__pos__/__neg__/__pow__/etc. But not __truediv__/__floordiv__.
Even simpler idea: move the __eq__ method to the Number class.
Then it would be impossible to instantiate a Number. |
|
Date |
User |
Action |
Args |
2021-05-15 08:22:40 | Sergey.Kirpichev | set | recipients:
+ Sergey.Kirpichev, rhettinger, docs@python, abcdef, miguendes, adityasriram.b |
2021-05-15 08:22:40 | Sergey.Kirpichev | set | messageid: <1621066960.23.0.614242876368.issue32133@roundup.psfhosted.org> |
2021-05-15 08:22:40 | Sergey.Kirpichev | link | issue32133 messages |
2021-05-15 08:22:40 | Sergey.Kirpichev | create | |
|