Title: Honor return type of `__new__` · Issue #1020 · python/mypy · GitHub
Open Graph Title: Honor return type of `__new__` · Issue #1020 · python/mypy
X Title: Honor return type of `__new__` · Issue #1020 · python/mypy
Description: Currently the return type of A(...) is implicitly A even if A.__new__ return something else. If the return type is Any, maybe A(...) should have type Any, and if it's a subclass, we should also use that. Currently this is a little diffic...
Open Graph Description: Currently the return type of A(...) is implicitly A even if A.__new__ return something else. If the return type is Any, maybe A(...) should have type Any, and if it's a subclass, we should also use...
X Description: Currently the return type of A(...) is implicitly A even if A.__new__ return something else. If the return type is Any, maybe A(...) should have type Any, and if it's a subclass, we should also...
Opengraph URL: https://github.com/python/mypy/issues/1020
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Honor return type of `__new__`","articleBody":"Currently the return type of `A(...)` is implicitly `A` even if `A.__new__` return something else. If the return type is `Any`, maybe `A(...)` should have type `Any`, and if it's a subclass, we should also use that. Currently this is a little difficult to implement due to implementation limitations (we derive the type object identity from the return type of a type object). Maybe we should introduce a new attribute to `Callable` for this purpose.\n","author":{"url":"https://github.com/JukkaL","@type":"Person","name":"JukkaL"},"datePublished":"2015-11-29T20:39:10Z","url":"https://github.com/python/mypy/issues/1020"}
| 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:8f43f794-a4cd-e86e-f6f6-abb5a82b8edd |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9874:1BEF18:1FE4CDD:2B17829:6B001922 |
| html-safe-nonce | 246a08bf566b37f564f27232c591f91919dcc071f25053481efd7dd0322892eb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5ODc0OjFCRUYxODoxRkU0Q0REOjJCMTc4Mjk6NkIwMDE5MjIiLCJ2aXNpdG9yX2lkIjoiNTU0NDk5MTA5ODA2NzIyODk2MiIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 9e3ca7ed8beabb987a8154aabb1d9aed034d062fff5d85d1e73937dbcdbe6415 |
| hovercard-subject-tag | issue:119386509 |
| 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/1020/issue_layout |
| twitter:image | https://opengraph.githubassets.com/da3956b229de9edc84a56481ad244bb29b033fd0c503d537dc5ddc7637017366/python/mypy/issues/1020 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/da3956b229de9edc84a56481ad244bb29b033fd0c503d537dc5ddc7637017366/python/mypy/issues/1020 |
| og:image:alt | Currently the return type of A(...) is implicitly A even if A.__new__ return something else. If the return type is Any, maybe A(...) should have type Any, and if it's a subclass, we should also use... |
| 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 | a2dd2291b1b13cc9c06f27ec92fa3dbaf34116fc24c9347b8539db61884c59f4 |
| 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 | 70121d4e855ee0bb7b75cf15d061d91f8863c0f8 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width