Title: Document generic parameters of generic classes · Issue #150319 · python/cpython · GitHub
Open Graph Title: Document generic parameters of generic classes · Issue #150319 · python/cpython
X Title: Document generic parameters of generic classes · Issue #150319 · python/cpython
Description: Documentation PEP-585 introduced native generic support several years ago by adding the __class_getitem__ method. But all docstrings for C-implemented __class_getitem__ methods are just "See PEP 585", and the online documentation has not...
Open Graph Description: Documentation PEP-585 introduced native generic support several years ago by adding the __class_getitem__ method. But all docstrings for C-implemented __class_getitem__ methods are just "See PEP 58...
X Description: Documentation PEP-585 introduced native generic support several years ago by adding the __class_getitem__ method. But all docstrings for C-implemented __class_getitem__ methods are just "See P...
Opengraph URL: https://github.com/python/cpython/issues/150319
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Document generic parameters of generic classes","articleBody":"### Documentation\n\nPEP-585 introduced native generic support several years ago by adding the `__class_getitem__` method. But all docstrings for C-implemented `__class_getitem__` methods are just \"See PEP 585\", and the online documentation has nothing to say about this.\n\nWhen a class is generic, we should tell users what it is generic over, so that those who wish to use types can understand what type parameters to use.\n\nIn the online documentation, any generic class should have a note like \"This class is generic [link to docs about generics] and takes N type parameters, representing respectively ...\".\n\nThe docstring for the `__class_getitem__` method should similarly outline what the type parameters are.\n\n\u003c!-- gh-linked-prs -->\n### Linked PRs\n* gh-150325\n* gh-150808\n* gh-150813\n* gh-150814\n\u003c!-- /gh-linked-prs -->\n","author":{"url":"https://github.com/JelleZijlstra","@type":"Person","name":"JelleZijlstra"},"datePublished":"2026-05-23T16:53:30Z","url":"https://github.com/python/cpython/issues/150319"}
| 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:23e3bf6e-47ba-0896-caf5-7b524abadab8 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 822A:251AC0:D6FD84:11DD4C6:6B00518C |
| html-safe-nonce | a19f528742a8d09c95f81f5ba97aac043492d247a459c21e811c4b6284550179 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI4MjJBOjI1MUFDMDpENkZEODQ6MTFERDRDNjo2QjAwNTE4QyIsInZpc2l0b3JfaWQiOiI3ODczMDc0MDczOTgxNjI4MjgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 53e0bda58822ca27a71e15f04423d32378c5f05a67e5f59f607b469e53d85588 |
| hovercard-subject-tag | issue:4508970403 |
| 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/150319/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b893ba37a734c6fde2fae13ee0129f1dad9ec3abec70da4cf19b7f0942b558da/python/cpython/issues/150319 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b893ba37a734c6fde2fae13ee0129f1dad9ec3abec70da4cf19b7f0942b558da/python/cpython/issues/150319 |
| og:image:alt | Documentation PEP-585 introduced native generic support several years ago by adding the __class_getitem__ method. But all docstrings for C-implemented __class_getitem__ methods are just "See PEP 58... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | JelleZijlstra |
| hostname | github.com |
| expected-hostname | github.com |
| None | f420f4996e6b1ff1ccd6d7683f8134f4b5f0f8a50124c210dbfe7490e5644abb |
| 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 | 26e00df917aba0f128135dc073ea0c5e33a70d40 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width