bpo-12029: [doc] clarify that except does not match virtual subclasses of the specified exception type by iritkatriel · Pull Request #32027 · python/cpython (original) (raw)
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 andprivacy statement. We’ll occasionally send you account related emails.
Already on GitHub?Sign in to your account
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.Learn more about bidirectional Unicode characters
[ Show hidden characters]({{ revealButtonHref }})
…s of the specified exception type
Co-authored-by: Éric merwok@netwok.org
It occurred to me that the uses of non-virtual subclass
should link to a glossary entry or paragraph in abc module doc explaining what that means! I think ABCs are not a very visible part of the language, and «virtual» means other (?) things in other languages, so best to guide readers.
It occurred to me that the uses of
non-virtual subclass
should link to a glossary entry or paragraph in abc module doc explaining what that means! I think ABCs are not a very visible part of the language, and «virtual» means other (?) things in other languages, so best to guide readers.
I wonder if we should leave the exceptions docs alone and just mention this in https://docs.python.org/3/library/abc.html#abc.ABCMeta in the paragraph where it mentions that super() won't work - we just say that exception matching doesn't either.
It occurred to me that the uses of
non-virtual subclass
should link to a glossary entry or paragraph in abc module doc explaining what that means! I think ABCs are not a very visible part of the language, and «virtual» means other (?) things in other languages, so best to guide readers.I wonder if we should leave the exceptions docs alone and just mention this in https://docs.python.org/3/library/abc.html#abc.ABCMeta in the paragraph where it mentions that super() won't work - we just say that exception matching doesn't either.
I decided to leave this in the exceptions reference (but to remove it from the tutorial) and add a link to 'abstract base class'.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
💯
I wonder if we should […] mention this in docs.python.org/3/library/abc.html#abc.ABCMeta in the paragraph where it mentions that super() won't work - we just say that exception matching doesn't either.
A small mention there wouldn’t hurt! It’s your call.
Thanks @iritkatriel for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9, 3.10.
🐍🍒⛏🤖
Sorry, @iritkatriel, I could not cleanly backport this to 3.10
due to a conflict.
Please backport using cherry_picker on command line.cherry_picker 45833b50f0ccf2abb01304c900afee05b6d01b9e 3.10
Sorry @iritkatriel, I had trouble checking out the 3.9
backport branch.
Please backport using cherry_picker on command line.cherry_picker 45833b50f0ccf2abb01304c900afee05b6d01b9e 3.9
iritkatriel added a commit that referenced this pull request
…s of the specified exception type (GH-32027)
(cherry picked from commit 45833b5)
iritkatriel added a commit that referenced this pull request
…s of the specified exception type (GH-32027)
(cherry picked from commit 45833b5)
iritkatriel added a commit that referenced this pull request
iritkatriel added a commit that referenced this pull request
hello-adam pushed a commit to hello-adam/cpython that referenced this pull request
acooke mannequin mentioned this pull request