Title: Callable and Tuple should be subclassable. · Issue #299 · python/typing · GitHub
Open Graph Title: Callable and Tuple should be subclassable. · Issue #299 · python/typing
X Title: Callable and Tuple should be subclassable. · Issue #299 · python/typing
Description: One can subclass collections.abc.Mapping as well as typing.Mapping[str, int]. However, it is currently prohibited to subclass typing.Callable and typing.Tuple: class C(collections.abc.Callable): ... # works class C(typing.Callable): ... ...
Open Graph Description: One can subclass collections.abc.Mapping as well as typing.Mapping[str, int]. However, it is currently prohibited to subclass typing.Callable and typing.Tuple: class C(collections.abc.Callable): .....
X Description: One can subclass collections.abc.Mapping as well as typing.Mapping[str, int]. However, it is currently prohibited to subclass typing.Callable and typing.Tuple: class C(collections.abc.Callable): .....
Opengraph URL: https://github.com/python/typing/issues/299
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Callable and Tuple should be subclassable.","articleBody":"One can subclass `collections.abc.Mapping` as well as `typing.Mapping[str, int]`. However, it is currently prohibited to subclass `typing.Callable` and `typing.Tuple`:\n\n``` python\nclass C(collections.abc.Callable): ... # works\nclass C(typing.Callable): ... # fails\n\nclass C(typing.List[T]): ... # works\nclass C(typing.Tuple[T, ...]): ... # fails\n```\n\nI think that both `Callable` and `Tuple` should be subclassable (at least in the simple form shown above).\n\n@gvanrossum If you agree, then you can assign this issue to me.\n","author":{"url":"https://github.com/ilevkivskyi","@type":"Person","name":"ilevkivskyi"},"datePublished":"2016-10-16T11:56:48Z","url":"https://github.com/python/typing/issues/299"}
| 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:2f01df44-71b5-b12b-819a-794a8c319c90 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AB12:2E9DBB:1AEF4A9:248170E:6B000466 |
| html-safe-nonce | 199af9ff2129a0cd39d23034fd5d8fcd246606312c54eeb370b4e722dc9de849 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQjEyOjJFOURCQjoxQUVGNEE5OjI0ODE3MEU6NkIwMDA0NjYiLCJ2aXNpdG9yX2lkIjoiODUyNDY5NTQ3OTM4Mjk2NzM5OCIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | c124b10445131586b1cb4128321092044f16cc0f153b7f166269a3e993db11e9 |
| hovercard-subject-tag | issue:183263225 |
| 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/typing/299/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5981b65977bdc459f2dee337037827878cebf0d08aeb7922ae2fdfbabc6cc6a9/python/typing/issues/299 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5981b65977bdc459f2dee337037827878cebf0d08aeb7922ae2fdfbabc6cc6a9/python/typing/issues/299 |
| og:image:alt | One can subclass collections.abc.Mapping as well as typing.Mapping[str, int]. However, it is currently prohibited to subclass typing.Callable and typing.Tuple: class C(collections.abc.Callable): ..... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ilevkivskyi |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0a0d8686a27478df474dd7415776a7a080cde8838b3cd92ea7601187572e5729 |
| turbo-cache-control | no-preview |
| go-import | github.com/python/typing git https://github.com/python/typing.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 24604008 |
| octolytics-dimension-repository_nwo | python/typing |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 24604008 |
| octolytics-dimension-repository_network_root_nwo | python/typing |
| 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 | 16a11879678aaf97e2a42c33ee70830aa084fa37 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width