Using multiple dispatch to allow for function overloading within OOP, is it possible for me to run the following code:
@dispatch(int)
def __init__(self, radius: int):
However, remove the int, as the attribute being passed in could either be an int or a str.
Use the
functools.singledispatchmethod
to overload a class method by its arguments' annotation.