Title: Decide Type[C] vs. Callable · Issue #1670 · python/mypy · GitHub
Open Graph Title: Decide Type[C] vs. Callable · Issue #1670 · python/mypy
X Title: Decide Type[C] vs. Callable · Issue #1670 · python/mypy
Description: From #1569 (comment): Should Type[C] be a subtype of Callable[...] in case the signature is compatible? If yes, we should also infer constraints for a Callable template and TypeType actual. If yes, join and meet will likely also be affec...
Open Graph Description: From #1569 (comment): Should Type[C] be a subtype of Callable[...] in case the signature is compatible? If yes, we should also infer constraints for a Callable template and TypeType actual. If yes,...
X Description: From #1569 (comment): Should Type[C] be a subtype of Callable[...] in case the signature is compatible? If yes, we should also infer constraints for a Callable template and TypeType actual. If yes,...
Opengraph URL: https://github.com/python/mypy/issues/1670
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Decide Type[C] vs. Callable","articleBody":"From https://github.com/python/mypy/pull/1569#issuecomment-224363459:\n- Should Type[C] be a subtype of Callable[...] in case the signature is compatible?\n- If yes, we should also infer constraints for a Callable template and TypeType actual.\n- If yes, join and meet will likely also be affected.\n\nThe current code seems to answer the first bullet with Yes:\n\n``` python\nclass C: pass\nT = Type[C]\ndef f(a: Callable[[], C]) -> None: pass\nf(C)\nf(T)\n```\n\nhas no errors. But what does that imply for the remaining two questions?\n","author":{"url":"https://github.com/gvanrossum","@type":"Person","name":"gvanrossum"},"datePublished":"2016-06-07T20:04:42Z","url":"https://github.com/python/mypy/issues/1670"}
| 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:f73e53f7-1624-32b3-b536-dcc78604eb73 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DD66:49948:276985:358DD3:6B006876 |
| html-safe-nonce | f5462d668f5a77460af96267483eba596384987b88ed8971b8d9e1a358f4bdf7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERDY2OjQ5OTQ4OjI3Njk4NTozNThERDM6NkIwMDY4NzYiLCJ2aXNpdG9yX2lkIjoiNzg2OTcwOTEzNTYzMjE2NDk4MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | a0af75e8c9642f5d6d28d652091a89da48fdec5de6f12d386a0745357dc311e5 |
| hovercard-subject-tag | issue:159011972 |
| 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/mypy/1670/issue_layout |
| twitter:image | https://opengraph.githubassets.com/ab8b48602e0592e0611d8991446ab282dd928790b9e956be14e114fcde8cd0ad/python/mypy/issues/1670 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/ab8b48602e0592e0611d8991446ab282dd928790b9e956be14e114fcde8cd0ad/python/mypy/issues/1670 |
| og:image:alt | From #1569 (comment): Should Type[C] be a subtype of Callable[...] in case the signature is compatible? If yes, we should also infer constraints for a Callable template and TypeType actual. If yes,... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | gvanrossum |
| hostname | github.com |
| expected-hostname | github.com |
| None | 6527e91c60c0b29d16606ff32ac5df8ecdc37a2a62205ea057a14d7762c870fa |
| turbo-cache-control | no-preview |
| go-import | github.com/python/mypy git https://github.com/python/mypy.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 7053637 |
| octolytics-dimension-repository_nwo | python/mypy |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 7053637 |
| octolytics-dimension-repository_network_root_nwo | python/mypy |
| 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 | 46f1cd2ae3cd8ae1a81019b5d619742e76f13bbd |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width