Title: Better __eq__ for generics · Issue #301 · python/typing · GitHub
Open Graph Title: Better __eq__ for generics · Issue #301 · python/typing
X Title: Better __eq__ for generics · Issue #301 · python/typing
Description: Currently, Iterable[T][int] == Iterable[int] returns False. It could be convenient to implement an __eq__ that returns True for generics that are considered the same from the point of view of static type checkers. Of course, there is a v...
Open Graph Description: Currently, Iterable[T][int] == Iterable[int] returns False. It could be convenient to implement an __eq__ that returns True for generics that are considered the same from the point of view of stati...
X Description: Currently, Iterable[T][int] == Iterable[int] returns False. It could be convenient to implement an __eq__ that returns True for generics that are considered the same from the point of view of stati...
Opengraph URL: https://github.com/python/typing/issues/301
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Better __eq__ for generics","articleBody":"Currently, `Iterable[T][int] == Iterable[int]` returns `False`. It could be convenient to implement an `__eq__` that returns `True` for generics that are considered the same from the point of view of static type checkers.\n\nOf course, there is a very simple way to do this: just compare the new `repr` for two classes :-)\nBut probably the right way would be to factor out the algorithm from the new `repr` that \"substitutes\" type variables and use it for both `repr` and `__eq__`.\n","author":{"url":"https://github.com/ilevkivskyi","@type":"Person","name":"ilevkivskyi"},"datePublished":"2016-10-18T13:26:52Z","url":"https://github.com/python/typing/issues/301"}
| 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:a0c52d10-ead1-3b34-657e-dfa0d228a2cb |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | C542:1EE55B:1D4130C:27F4A89:6B001698 |
| html-safe-nonce | 21afec9243d7f27297f5c0dddd181c57e2c6dbed31c1cb20ba3ca276672b39d9 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJDNTQyOjFFRTU1QjoxRDQxMzBDOjI3RjRBODk6NkIwMDE2OTgiLCJ2aXNpdG9yX2lkIjoiNzQwOTY3MzA5MjYxMzU0MzU3NiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 5601ec484b516b6fe51612c130ea3620e6288a1b32c5ad8d35d511544c91566d |
| hovercard-subject-tag | issue:183685860 |
| 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/301/issue_layout |
| twitter:image | https://opengraph.githubassets.com/5981b65977bdc459f2dee337037827878cebf0d08aeb7922ae2fdfbabc6cc6a9/python/typing/issues/301 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/5981b65977bdc459f2dee337037827878cebf0d08aeb7922ae2fdfbabc6cc6a9/python/typing/issues/301 |
| og:image:alt | Currently, Iterable[T][int] == Iterable[int] returns False. It could be convenient to implement an __eq__ that returns True for generics that are considered the same from the point of view of stati... |
| 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 | a2dd2291b1b13cc9c06f27ec92fa3dbaf34116fc24c9347b8539db61884c59f4 |
| 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 | 70121d4e855ee0bb7b75cf15d061d91f8863c0f8 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width