-
-
Notifications
You must be signed in to change notification settings - Fork 2.1k
raising PreventUpdate should not print to stderr, and PreventUpdate should not inherit Exception #516
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
Comments
From https://docs.python.org/3/library/exceptions.html#BaseException
The print statement should be removed. |
@T4rk1n I'm not convinced one way or the other, but one practical benefit of making |
|
Actually However, thinking about it a bit more, I suspect it would actually be more confusing than useful to have So, all that said, unless we have a clear use case for |
Hi, I think the default implementation should not print to
stderr
whenPreventUpdate
is raised. This is a minor point, because the following is a work-around (and as the docs improve bothPreventUpdate
and example of a custom error handler could be documented!)Also, as a minor point, PreventUpdate should probably inherit
BaseException
without inheriting Exception - the reason is the same as whyStopIteration
does not inheritException
(because its not an error).The text was updated successfully, but these errors were encountered: