Title: Make Mapping covariant · Issue #510 · python/typeshed · GitHub
Open Graph Title: Make Mapping covariant · Issue #510 · python/typeshed
X Title: Make Mapping covariant · Issue #510 · python/typeshed
Description: I think that Mapping[KT, VT] should be covariant in both KT and VT. The argument for this is that it doesn't have any mutation operations. Mypy might complain (or may eventually start to complain) about having covariant type variables in...
Open Graph Description: I think that Mapping[KT, VT] should be covariant in both KT and VT. The argument for this is that it doesn't have any mutation operations. Mypy might complain (or may eventually start to complain) ...
X Description: I think that Mapping[KT, VT] should be covariant in both KT and VT. The argument for this is that it doesn't have any mutation operations. Mypy might complain (or may eventually start to compla...
Opengraph URL: https://github.com/python/typeshed/issues/510
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Make Mapping covariant","articleBody":"I think that `Mapping[KT, VT]` should be covariant in both `KT` and `VT`. The argument for this is that it doesn't have any mutation operations. Mypy might complain (or may eventually start to complain) about having covariant type variables in argument types but in this case it's okay so we can probably just `# type: ignore` them.\n\n(It wouldn't be safe since somebody can write a `get` method that actually mutates the mapping, but consenting adults...)\n","author":{"url":"https://github.com/JukkaL","@type":"Person","name":"JukkaL"},"datePublished":"2016-08-30T19:00:55.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":1},"url":"https://github.com/510/typeshed/issues/510"}
| 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:d3975f03-10af-ce2d-d52b-e2788a484919 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AAAE:11BBD8:217CC29:224FFEC:6A62DE06 |
| html-safe-nonce | 6dfa164925cfb0b44477a284a9424bc47f1e37b20caf368fa4bace32caf29de8 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQUFFOjExQkJEODoyMTdDQzI5OjIyNEZGRUM6NkE2MkRFMDYiLCJ2aXNpdG9yX2lkIjoiNjkxMzE3MDExMDA2NjkwODY3OCIsInJlZ2lvbl9lZGdlIjoic2VhIiwicmVnaW9uX3JlbmRlciI6InNlYSJ9 |
| visitor-hmac | cd91c733f48f184e430f908efd8206be3864686aa4683b3003c390ba04e6c003 |
| hovercard-subject-tag | issue:174098142 |
| 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/typeshed/510/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f1a424e3e33a4e4b5ac0d38acf003b52e367c04854b006bc2883923b27c299dd/python/typeshed/issues/510 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f1a424e3e33a4e4b5ac0d38acf003b52e367c04854b006bc2883923b27c299dd/python/typeshed/issues/510 |
| og:image:alt | I think that Mapping[KT, VT] should be covariant in both KT and VT. The argument for this is that it doesn't have any mutation operations. Mypy might complain (or may eventually start to complain) ... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | JukkaL |
| hostname | github.com |
| expected-hostname | github.com |
| None | df33b1b61ee7b9a0af988199bfc3503c9c1acafb1f1d40e1f140ea7c84f890dd |
| turbo-cache-control | no-preview |
| go-import | github.com/python/typeshed git https://github.com/python/typeshed.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 31696383 |
| octolytics-dimension-repository_nwo | python/typeshed |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 31696383 |
| octolytics-dimension-repository_network_root_nwo | python/typeshed |
| 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 | d41cd1bdb290013455c0ac430fa755621733f5eb |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width