Title: Inconsistent `ast.parse` result for `python<3.11` and PEP654 · Issue #96587 · python/cpython · GitHub
Open Graph Title: Inconsistent `ast.parse` result for `python<3.11` and PEP654 · Issue #96587 · python/cpython
X Title: Inconsistent `ast.parse` result for `python<3.11` and PEP654 · Issue #96587 · python/cpython
Description: PEP654 introduced exception groups and except* in python3.11 Link: https://peps.python.org/pep-0654/ Right now it is possible to parse except* with older ast.parse(..., feature_version=(3, 10)). Example: >>> import ast >>> code = ''' ......
Open Graph Description: PEP654 introduced exception groups and except* in python3.11 Link: https://peps.python.org/pep-0654/ Right now it is possible to parse except* with older ast.parse(..., feature_version=(3, 10)). Ex...
X Description: PEP654 introduced exception groups and except* in python3.11 Link: https://peps.python.org/pep-0654/ Right now it is possible to parse except* with older ast.parse(..., feature_version=(3, 10)). Ex...
Opengraph URL: https://github.com/python/cpython/issues/96587
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Inconsistent `ast.parse` result for `python\u003c3.11` and PEP654","articleBody":"PEP654 introduced exception groups and `except*` in python3.11\r\nLink: https://peps.python.org/pep-0654/\r\n\r\nRight now it is possible to parse `except*` with older `ast.parse(..., feature_version=(3, 10))`.\r\nExample:\r\n\r\n```python\r\n>>> import ast\r\n>>> code = '''\r\n... try:\r\n... ...\r\n... except* Exception:\r\n... ...\r\n... '''\r\n>>> \r\n>>> ast.parse(code)\r\n\u003cast.Module object at 0x10c685410>\r\n>>> ast.parse(code, feature_version=(3, 8))\r\n\u003cast.Module object at 0x10c685280>\r\n>>> \r\n```\r\n\r\nWhich is not correct.\r\n\r\nBut, unlike https://github.com/python/cpython/issues/96427 it is very simple to fix. And I belive it should be fixed.\r\n\r\nI've already applied a patch and will send it shortly after :)","author":{"url":"https://github.com/sobolevn","@type":"Person","name":"sobolevn"},"datePublished":"2022-09-05T16:18:34Z","url":"https://github.com/python/cpython/issues/96587"}
| 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:020406bc-47b6-ac66-3ac8-2c7fbbd2fb73 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | CE22:370586:2758:3352:6B004F02 |
| html-safe-nonce | 330ac7c55855f9582115722cdfac13294439d1202c04a90e5616c8fc73f60710 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDRTIyOjM3MDU4NjoyNzU4OjMzNTI6NkIwMDRGMDIiLCJ2aXNpdG9yX2lkIjoiNDc3NTIzNzk4ODMwNzE5MzYwMiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | db11e1e99b84f829e3ef63e6434379671bd8cb9397c15e44361dd8545f86317f |
| hovercard-subject-tag | issue:1362249432 |
| 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/96587/issue_layout |
| twitter:image | https://opengraph.githubassets.com/c6ccd024a1bd92c6851554ddb50af2ad4aff7f375a3ab2db497a46fff2016a3a/python/cpython/issues/96587 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/c6ccd024a1bd92c6851554ddb50af2ad4aff7f375a3ab2db497a46fff2016a3a/python/cpython/issues/96587 |
| og:image:alt | PEP654 introduced exception groups and except* in python3.11 Link: https://peps.python.org/pep-0654/ Right now it is possible to parse except* with older ast.parse(..., feature_version=(3, 10)). Ex... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | sobolevn |
| hostname | github.com |
| expected-hostname | github.com |
| None | f9517bf360d46638a1e5e7daee7158842fe5ef43c9000afa0e127564a7c2f39b |
| 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 | b27c5dde30676028abd5c5fc53ce5c9b625f8281 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width