3 ms·
You will, the type could be Union[int, float]. Alternatively, you could also use the abstract base classes in the numbers module - https://docs.python.org/3/li
by zomglings 7y ago
You will, the type could be Union[int, float].
Alternatively, you could also use the abstract base classes in the numbers module - https://docs.python.org/3/library/numbers.html https://docs.python.org/3/library/numbers.html
numbers.Number may be a good choice.
Still, you are right, overloading like this may be okay as a thought exercise, but would raise some serious questions during a code review. :)