-
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
Issue on page /keyword_arguments.html #132
Comments
Plum only dispatches positional arguments, and pipes through keyword arguments. To all effects, what plum is doing is interpreting your function definitions as @dispatch
def f(x: int, y: float, /):
... # Method 1
@dispatch
def f(y: float, x: int, /):
... # Method 2 . NotFoundLookupError: `f()` could not be resolved.
Closest candidates are the following:
f(x: int, y: float)
<function f at 0x10643b6a0> @ /<ipython-input-4-b2e5973ca9b8>:1
f(y: float, x: int)
<function f at 0x106439620> @ /<ipython-input-4-b2e5973ca9b8>:5 because plum will attempt to dispatch to a function with signature The |
@PhilipVinc , thanks! I agree Plum does such. Agree it is convenient now. I'm trying to understand the
In the above,
No choices, yes? Which example shows the choice necessity? |
Hey @kuraga, You're right that it would perhaps be possible to set things up in the way that you describe, and that a construction like that wouldn't be unreasonable. Perhaps the documentation is worded a little too strongly. It would be interesting to explore this further! :) Generally, the design of Plum mimics Julia as closely as possible, which works in the same way. |
Hm. |
Good day!
https://beartype.github.io/plum/keyword_arguments.html#why :
Yes.
It's not confusing. It shouldn't match, should it? There is no method
(f) with (float x) and (int y)
.Thoughts?
The text was updated successfully, but these errors were encountered: