Title: Example in dataclass documentation is incorrectly typed · Issue #98576 · python/cpython · GitHub
Open Graph Title: Example in dataclass documentation is incorrectly typed · Issue #98576 · python/cpython
X Title: Example in dataclass documentation is incorrectly typed · Issue #98576 · python/cpython
Description: The example of InitVar in dataclass documentation does not pass static type checking. This caused some confusion here: python/mypy#13934 PR: #98577 PR: gh-98909 PR: gh-98910
Open Graph Description: The example of InitVar in dataclass documentation does not pass static type checking. This caused some confusion here: python/mypy#13934 PR: #98577 PR: gh-98909 PR: gh-98910
X Description: The example of InitVar in dataclass documentation does not pass static type checking. This caused some confusion here: python/mypy#13934 PR: #98577 PR: gh-98909 PR: gh-98910
Opengraph URL: https://github.com/python/cpython/issues/98576
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Example in dataclass documentation is incorrectly typed","articleBody":"The example of InitVar in dataclass documentation does not pass static type checking. This caused some confusion here: https://github.com/python/mypy/issues/13934\r\n\r\n* PR: #98577\r\n\r\n\u003c!-- gh-pr-number: gh-98909 --\u003e\r\n* PR: gh-98909\r\n\u003c!-- /gh-pr-number --\u003e\r\n\r\n\r\n\u003c!-- gh-pr-number: gh-98910 --\u003e\r\n* PR: gh-98910\r\n\u003c!-- /gh-pr-number --\u003e\r\n","author":{"url":"https://github.com/hauntsaninja","@type":"Person","name":"hauntsaninja"},"datePublished":"2022-10-23T20:56:27.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/98576/cpython/issues/98576"}
| 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:848d4740-da40-db53-7e00-0aebd843e5cf |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | B732:D1AA1:63FECB:887E7A:6A50765D |
| html-safe-nonce | f299df395da99ff91eff63e23cb96469bfa5e65be3d98c56914067af8a9206c0 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCNzMyOkQxQUExOjYzRkVDQjo4ODdFN0E6NkE1MDc2NUQiLCJ2aXNpdG9yX2lkIjoiNDgyNTY3NTE4NTExNjk2ODU0MSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | f6708d32742583af64f93a78571fb3113beb67ca4ade7c78e4b023cf9bfbd2f4 |
| hovercard-subject-tag | issue:1419931455 |
| 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/98576/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8d0c3eba4afbfd3e820a395530bf982692af375d560f610627e0ab148d481be9/python/cpython/issues/98576 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8d0c3eba4afbfd3e820a395530bf982692af375d560f610627e0ab148d481be9/python/cpython/issues/98576 |
| og:image:alt | The example of InitVar in dataclass documentation does not pass static type checking. This caused some confusion here: python/mypy#13934 PR: #98577 PR: gh-98909 PR: gh-98910 |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | hauntsaninja |
| hostname | github.com |
| expected-hostname | github.com |
| None | d6dc8294eb500fa36bbc57472d61fe87c522f9c3c1d64f70f4926f66a66a7efb |
| 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 | 7ac0ad2f2c7e4b9056617355fd9e33e22b0c8df9 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width