8000 bpo-12029: [doc] clarify that except does not match virtual subclasses of the specified exception type by iritkatriel · Pull Request #32027 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

bpo-12029: [doc] clarify that except does not match virtual subclasses of the specified exception type #32027

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

Merged
merged 9 commits into from
Mar 21, 2022
Prev Previous commit
Next Next commit
revert change to tutorial - this is too advanced to be mentioned there
  • Loading branch information
iritkatriel committed Mar 21, 2022
commit 44d9ba0157f962517f052472ccb74b180bdaa1fa
2 changes: 1 addition & 1 deletion Doc/tutorial/errors.rst
Original file line number Diff line number Diff line change
Expand Up @@ -121,7 +121,7 @@ may name multiple exceptions as a parenthesized tuple, for example::
... pass

A class in an :keyword:`except` clause is compatible with an exception if it is
the same class or a non-virtual base class thereof (but not the other way around --- an
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).
For example, the following code will print B, C, D in that order::

Expand Down
0