Title: SyntaxError location for `*args` in class bases is inconsistent · Issue #93165 · python/cpython · GitHub
Open Graph Title: SyntaxError location for `*args` in class bases is inconsistent · Issue #93165 · python/cpython
X Title: SyntaxError location for `*args` in class bases is inconsistent · Issue #93165 · python/cpython
Description: Code snippet: class C(list[int]): ... On Python 3.9: >>> class C(list[*a]): ... File "
Open Graph Description: Code snippet: class C(list[int]): ... On Python 3.9: >>> class C(list[*a]): ... File "
X Description: Code snippet: class C(list[int]): ... On Python 3.9: >>> class C(list[*a]): ... File "<stdin>", line 1 class C(list[*a]): ... ^ SyntaxError: invalid syntax >>> On ...
Opengraph URL: https://github.com/python/cpython/issues/93165
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"SyntaxError location for `*args` in class bases is inconsistent","articleBody":"Code snippet:\r\n\r\n```python\r\nclass C(list[int]): ...\r\n```\r\n\r\nOn Python 3.9:\r\n```pycon\r\n\u003e\u003e\u003e class C(list[*a]): ...\r\n File \"\u003cstdin\u003e\", line 1\r\n class C(list[*a]): ...\r\n ^\r\nSyntaxError: invalid syntax\r\n\u003e\u003e\u003e \r\n```\r\n\r\nOn Python 3.10:\r\n```pycon\r\n\r\n\u003e\u003e\u003e class C(list[*a]): ...\r\n File \"\u003cstdin\u003e\", line 1\r\n class C(list[*a]): ...\r\n ^\r\nSyntaxError: expected ':'\r\n\u003e\u003e\u003e\r\n```\r\n\r\nI'd have expected it to point directly at the `*` in both cases.","author":{"url":"https://github.com/tusharsadhwani","@type":"Person","name":"tusharsadhwani"},"datePublished":"2022-05-24T09:48:10.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":3},"url":"https://github.com/93165/cpython/issues/93165"}
| 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:8b9b3531-8057-ec6e-04c3-52dc02df19bf |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 8AA0:333370:12A5ED1:19ECE57:696A4082 |
| html-safe-nonce | bb6324679b8909b774742a7b9837d1f893a5cde71a6cd0962331275872757a07 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4QUEwOjMzMzM3MDoxMkE1RUQxOjE5RUNFNTc6Njk2QTQwODIiLCJ2aXNpdG9yX2lkIjoiMzU4ODAwODg0MzI1OTAzNTc3OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 76bd210108759672ac54f4045e62875298a66df0d5fed2df8682710ed3fa0b2d |
| hovercard-subject-tag | issue:1246286930 |
| 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/93165/issue_layout |
| twitter:image | https://opengraph.githubassets.com/28bec146f47abfddebe4c04a307623949eafc328e1275246db79826bbc9a7fa6/python/cpython/issues/93165 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/28bec146f47abfddebe4c04a307623949eafc328e1275246db79826bbc9a7fa6/python/cpython/issues/93165 |
| og:image:alt | Code snippet: class C(list[int]): ... On Python 3.9: >>> class C(list[*a]): ... File " |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | tusharsadhwani |
| hostname | github.com |
| expected-hostname | github.com |
| None | 321736bfdb3f591415ae895a0459bec204b26a76caf47ba5c980634cfacc4538 |
| 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 | 13581a31d51edf4a3aca179e10890a4d4f9b6d76 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width