-
-
Notifications
You must be signed in to change notification settings - Fork 30.1k
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
functools.singledispatchfunction has confusing error message if no positional arguments are passed in #85294
Comments
this is with python 3.8:
So when using functools.singledispatch or functools.singledispatchmethod, you need to provide at least 1 positional argument so it can dispatch based on the type of said argument however, with Example with
you end up getting:
but with just regular
you get an error that tells you what actually is wrong:
it seems that the code in |
Any progress with this, I apparently found this by chance after having spent a good hour to understand the missing positional argument was the cause of my troubles. I'm on Python 3.10.7 |
GH-21471) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
…cefully (pythonGH-21471) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
…cefully (pythonGH-21471) Co-authored-by: Serhiy Storchaka <storchaka@gmail.com>
Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.
Show more details
GitHub fields:
bugs.python.org fields:
The text was updated successfully, but these errors were encountered: