-
-
Notifications
You must be signed in to change notification settings - Fork 397
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
python.raise_exception() docs give wrong signature #1261
Comments
I can reproduce the issue. One downside of your proposed fix is the inconsistency with all the other operations which allow the global But I don't know how this can be fixed apart from hardcoding which params are passed to the exception constructor... |
Thanks for getting back to me on this.
Sorry for the confusion. I wasn't actually proposing the fix. I was just documenting what works: python.raise_exception(
NotImplementedError,
"This is not implemented",
name="Raise NotImplementedError exception",
) That's how I had to use it for it to work without an error. I'm not saying that should be how it works in the future. If you need to change the code so the call works like the docs example, that seems just fine to me. It would just be a backwards incompatible change. |
Ah, I'm sorry, I misread the issue description.
Hmm. Imo the incorrect docs example should be fixed; the inconsistency could always be fixed later. @Fizzadar Do you have any ideas how the kwargs handling could be improved? |
Describe the bug
I believe the example from the docs for this function is wrong:
It produces the error:
It should actually be:
Meta
The text was updated successfully, but these errors were encountered: