-
-
Notifications
You must be signed in to change notification settings - Fork 30.3k
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
Need a detailed explanation of the below added line into documentation #117597
Labels
docs
Documentation in the Doc dir
Comments
An class ErrorA(Exception):
pass
class ErrorAPlus(ErrorA):
pass
class ErrorB(Exception):
pass
for cls in [ErrorA, ErrorAPlus, ErrorB]:
try:
raise cls()
except ErrorA:
print("Caught error A") Output:
Do you think the docs need to be updated with this? |
Yes, correct |
iritkatriel
pushed a commit
that referenced
this issue
Apr 9, 2024
erlend-aasland
pushed a commit
that referenced
this issue
Apr 9, 2024
diegorusso
pushed a commit
to diegorusso/cpython
that referenced
this issue
Apr 17, 2024
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
consider this line "A class in an [except] clause is compatible with an exception if it is the same class or a base class thereof (but not the other way around — an except clause listing a derived class is not compatible with a base class)" which comes under errors and exception in python tutorial web page, please give clear explanation, because as it is not understandable by programmers who is new to python , added screenshot below
Linked PRs
The text was updated successfully, but these errors were encountered: