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

Conversation

iritkatriel
Copy link
Member
@iritkatriel iritkatriel commented Mar 21, 2022

Co-authored-by: Éric <merwok@netwok.org>
@merwok
Copy link
Member
merwok commented Mar 21, 2022

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.

@iritkatriel
Copy link
Member Author

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.

@iritkatriel
Copy link
Member Author

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'.

Copy link
Member
@merwok merwok left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💯

@merwok
Copy link
Member
merwok commented Mar 21, 2022

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.

@iritkatriel iritkatriel merged commit 45833b5 into python:main Mar 21, 2022
@miss-islington
Copy link
Contributor

Thanks @iritkatriel for the PR 🌮🎉.. I'm working now to backport this PR to: 3.9, 3.10.
🐍🍒⛏🤖

@miss-islington
Copy link
Contributor

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

@miss-islington
Copy link
Contributor

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 Mar 21, 2022
…s of the specified exception type (GH-32027)

(cherry picked from commit 45833b5)
iritkatriel added a commit that referenced this pull request Mar 21, 2022
…s of the specified exception type (GH-32027)

(cherry picked from commit 45833b5)
@bedevere-bot bedevere-bot removed the needs backport to 3.10 only security fixes label Mar 21, 2022
@bedevere-bot
Copy link

GH-32034 is a backport of this pull request to the 3.10 branch.

@bedevere-bot
Copy link

GH-32035 is a backport of this pull request to the 3.9 branch.

@bedevere-bot bedevere-bot removed the needs backport to 3.9 only security fixes label Mar 21, 2022
iritkatriel added a commit that referenced this pull request Mar 21, 2022
…s of the specified exception type (GH-32027) (GH-32034)

(cherry picked from commit 45833b5)
iritkatriel added a commit that referenced this pull request Mar 21, 2022
…s of the specified exception type (GH-32027) (GH-32035)

(cherry picked from commit 45833b5)
hello-adam pushed a commit to hello-adam/cpython that referenced this pull request Jun 2, 2022
@iritkatriel iritkatriel deleted the bpo-12029 branch October 18, 2022 14:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
docs Documentation in the Doc dir skip news
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants
0