Title: Make types classes that are generic at type time subscriptable at runtime · Issue #110209 · python/cpython · GitHub
Open Graph Title: Make types classes that are generic at type time subscriptable at runtime · Issue #110209 · python/cpython
X Title: Make types classes that are generic at type time subscriptable at runtime · Issue #110209 · python/cpython
Description: Feature or enhancement Proposal: coroutine and generator should be subscriptable at runtime as they already are at type time >>> import types >>> types.CoroutineType[None, None, int] TypeError: type 'coroutine' is not subscriptable https...
Open Graph Description: Feature or enhancement Proposal: coroutine and generator should be subscriptable at runtime as they already are at type time >>> import types >>> types.CoroutineType[None, None, int] TypeError: typ...
X Description: Feature or enhancement Proposal: coroutine and generator should be subscriptable at runtime as they already are at type time >>> import types >>> types.CoroutineType[None, None, i...
Opengraph URL: https://github.com/python/cpython/issues/110209
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Make types classes that are generic at type time subscriptable at runtime","articleBody":"# Feature or enhancement\r\n\r\n### Proposal:\r\ncoroutine and generator should be subscriptable at runtime as they already are at type time\r\n```python\r\n>>> import types\r\n>>> types.CoroutineType[None, None, int]\r\nTypeError: type 'coroutine' is not subscriptable\r\n```\r\nhttps://github.com/python/typeshed/blob/31916d1e0c4c213cac031e2a448e5531206e3ab4/stdlib/types.pyi#L402\r\n\r\n### Has this already been discussed elsewhere?\r\n\r\nThis is a minor feature, which does not need previous discussion elsewhere\r\n\r\n### Links to previous discussion of this feature:\r\n\r\nhttps://github.com/python/typing/issues/1480 is where this stemmed from\r\n\r\n\u003c!-- gh-linked-prs -->\r\n### Linked PRs\r\n* gh-110212\r\n\u003c!-- /gh-linked-prs -->\r\n","author":{"url":"https://github.com/Gobot1234","@type":"Person","name":"Gobot1234"},"datePublished":"2023-10-02T10:25:45Z","url":"https://github.com/python/cpython/issues/110209"}
| 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:1efd7dad-b055-8e34-5541-c0d50a841c5d |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BF98:137B3:191755C:2117A3F:6B0029A4 |
| html-safe-nonce | 75a7fe9d9096012a88c9601ad503e19f78966c67d61310341b9a8e03d5fe41cf |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRjk4OjEzN0IzOjE5MTc1NUM6MjExN0EzRjo2QjAwMjlBNCIsInZpc2l0b3JfaWQiOiI1MzM0ODUyNDg3MzA2MjkxNjIwIiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | c2e8310537f82d5727abf405f6e94efb2a666210e376c0def5d3434a7ac8878e |
| hovercard-subject-tag | issue:1921643475 |
| 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/110209/issue_layout |
| twitter:image | https://opengraph.githubassets.com/a371f6bfdfa76d76802ed215baca6333d0c0e004b05ba56128015a317c0796f3/python/cpython/issues/110209 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/a371f6bfdfa76d76802ed215baca6333d0c0e004b05ba56128015a317c0796f3/python/cpython/issues/110209 |
| og:image:alt | Feature or enhancement Proposal: coroutine and generator should be subscriptable at runtime as they already are at type time >>> import types >>> types.CoroutineType[None, None, int] TypeError: typ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | Gobot1234 |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7d0829bbde9e48b2486cb5dd6d147896eb01d32134627091f818958a935ef3f0 |
| 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 | f3f3a43ca095cdea3abbb394112e971f9fdb94fa |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width