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
Document BaseException constructor #81406
Comments
The "Builtin Exceptions" page does not document the constructors of the listed exception classes. All it says is
This is quite vague and does not really guide users for individual exception classes. |
OSError does have its constructor documented at https://docs.python.org/3/library/exceptions.html#OSError (farther down the page I think you're reading; you didn't provide the URL you're referring to so I'm somewhat guessing). It is specifically vague because it varies from exception to exception and you need to check the exception you're using to see if it differs from BaseException. Thanks for letting us know about your concerns, but I'm closing as "not a bug". |
Thanks for your answer, but I believe this is a real document bug. OSError does have its signature documented, but the majority of other exception classes do not do so, neither does BaseException explains a default behavior clearly (see my quote above). As an example, ValueError accepts multiple arguments and makes use of all of them when given, but from the document, I can barely guess this out. |
Fair enough. I've changed the title to point out only BaseException needs its constructor documented as every other extension inherits from it and so its cascades down. |
The doc for BaseException says also
I don't think there is anything that can be added here that would make the situation clearer. |
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: