Title: Documentation for except* could be clearer · Issue #135629 · python/cpython · GitHub
Open Graph Title: Documentation for except* could be clearer · Issue #135629 · python/cpython
X Title: Documentation for except* could be clearer · Issue #135629 · python/cpython
Description: Documentation https://docs.python.org/3.14/reference/compound_stmts.html#except-star This is the current documentation for except* which I think could be clearer. I had to read this a few times over and even ask an AI chat bot for clarif...
Open Graph Description: Documentation https://docs.python.org/3.14/reference/compound_stmts.html#except-star This is the current documentation for except* which I think could be clearer. I had to read this a few times ove...
X Description: Documentation https://docs.python.org/3.14/reference/compound_stmts.html#except-star This is the current documentation for except* which I think could be clearer. I had to read this a few times ove...
Opengraph URL: https://github.com/python/cpython/issues/135629
X: @github
Domain: github.com
IPv4 address: 140.82.114.4
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Documentation for except* could be clearer","articleBody":"# Documentation\n\nhttps://docs.python.org/3.14/reference/compound_stmts.html#except-star\n\nThis is the current documentation for `except*` which I think could be clearer. I had to read this a few times over and even ask an AI chat bot for clarification. \n\n```\nThe except* clause(s) are used for handling ExceptionGroups, but in the case of exception groups we can have partial \nwhen the type matches some of the exceptions in the group. This means that multiple except* clauses can execute, each handling \npart of the exception group. Each clause executes at most once and handles an exception group of all matching exceptions. Each \nexception in the group is handled by at most one except* clause, the first that matches it.\n```\n\nI think it could be much clearer with something like this where the large paragraph is made more concise and broken up into bullet points. \n\n```\nThe except* clause(s) are used to handle ExceptionGroups, which contain multiple exceptions raised together. \nLike a regular except clause, except* matches exceptions based on their type, but it can also match a subset of exceptions within \nan ExceptionGroup. This allows multiple except* clauses to execute, each handling a specific part of the exception group. \n\n- Each except* clause executes at most once and handles a subgroup of exceptions that match its specified type.\n- Every exception in the group is handled by only one except* clause, the first one that matches its type.\n```\n\nThe first paragraph could also include why one would want to use an except* clause. The second paragraph of 8.4.2 could be made clearer as well.\n\nPlease let me know your thoughts. I am happy to submit a patch for this.\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-136150\n* gh-139059\n* gh-139060\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/mandeep","@type":"Person","name":"mandeep"},"datePublished":"2025-06-17T17:12:01Z","url":"https://github.com/python/cpython/issues/135629"}
| react-profiling | 0 |
| react-import-map | react,react-dom,react-dom/client,react-dom/profiling,react-is,react/compiler-runtime,react/jsx-dev-runtime,react/jsx-runtime,scheduler@b8488ee2c322 |
| route-pattern | /_view_fragments/issues/show/:user_id/:repository/:id/issue_layout(.:format) |
| route-controller | voltron_issues_fragments |
| route-action | issue_layout |
| fetch-nonce | v2:37a8a7fe-cd49-5475-dbc2-45bfd9f1421f |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D0DE:83634:E69B58:1346B8E:6B064C03 |
| html-safe-nonce | a748d0b566859ed5204c51e24d228ffa5b236537403b86f91497875558f7ad0f |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEMERFOjgzNjM0OkU2OUI1ODoxMzQ2QjhFOjZCMDY0QzAzIiwidmlzaXRvcl9pZCI6IjE5NDEwMDYxODk0MTY4Mjc5MDciLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | c8a589486dd9ee9ea20facec870161cfffe4a6fd85260e75589239a4fadc218d |
| hovercard-subject-tag | issue:3154196900 |
| github-keyboard-shortcuts | repository,issues,copilot |
| google-site-verification | Apib7-x98H0j5cPqHWwSMm6dNU4GmODRoqxLiDzdx9I |
| octolytics-url | https://collector.github.com/github/collect |
| analytics-location | / |
| fb:app_id | 1401488693436528 |
| apple-itunes-app | app-id=1477376905, app-argument=https://github.com/_view_fragments/issues/show/python/cpython/135629/issue_layout |
| twitter:image | https://opengraph.githubassets.com/de9b64a71c856ca872090dc7ac7b3aa64cdb0d9e66448e53971f8f5f0dd331d5/python/cpython/issues/135629 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/de9b64a71c856ca872090dc7ac7b3aa64cdb0d9e66448e53971f8f5f0dd331d5/python/cpython/issues/135629 |
| og:image:alt | Documentation https://docs.python.org/3.14/reference/compound_stmts.html#except-star This is the current documentation for except* which I think could be clearer. I had to read this a few times ove... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | mandeep |
| hostname | github.com |
| expected-hostname | github.com |
| None | 772b6997ca4daa0428dd49a25d76052e765555ae560fe9c88517eb828bbd861e |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| turbo-body-classes | logged-out env-production page-responsive |
| disable-turbo | false |
| browser-stats-url | https://api.github.com/_private/browser/stats |
| browser-errors-url | https://api.github.com/_private/browser/errors |
| release | f1f9a08f7c769a37f1dfc18ad43d463c222a7eea |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
| Server | github.com |
| Content-Type | text/html; charset=utf-8 |
| Cache-Control | max-age=0, private, must-revalidate |
Viewport: width=device-width