-
Notifications
You must be signed in to change notification settings - Fork 24
New issue
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
Can a function with keyword arguments be decorated with @multimethod? #131
Comments
As is, called with a positional Foo().call_n('', lambda s: s) Using Foo().call_n('', func=lambda s: s) |
Could you please give an example of
but it reported errors as follows:
|
Try it with a base/stub implementation: class Foo:
@multidispatch
def call_n(self, name): ...
@call_n.register
def call_n1(self, name: str, nets: str):
print(f"NETS")
...
And this is only relevant for keyword argument dispatching. Your original post with |
For example, I have the following code:
How can we distinguish between
call_n
andcall_n2
when making a call?The text was updated successfully, but these errors were encountered: