We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Try this code
from plum import dispatch class A: @dispatch def __init__(self): self.__init__(1) @dispatch def __init__(self, x:int): print(str(x)) class B(A): def __init__(self): super().__init__() B()
Expected: B is constructed with default value 1
Actual:
TypeError: __init__() takes 1 positional argument but 2 were given
I'm not sure what is going on as constructing A() works fine.
Note the print is just for clarity, normally some field initialization would happen there.
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Try this code
Expected: B is constructed with default value 1
Actual:
I'm not sure what is going on as constructing A() works fine.
Note the print is just for clarity, normally some field initialization would happen there.
The text was updated successfully, but these errors were encountered: