Jan. 18, 2021
4:28 p.m.
I've been following along various issues in mypy regarding challenges with getting the ABCs in numbers (https://docs.python.org/3/library/numbers.html) working. Currently, there's a lot of clever logic in the functions int, float, and complex. Currently, inheriting from Real doesn't give you __complex__. This is because the complex function doesn't need it—it falls back to __float__. I think it would be nice if it did for the purpose of type annotations. Best, Neil