Title: Prefer `__new__` over `__init__` for determining callable type of a class · Issue #5647 · python/mypy · GitHub
Open Graph Title: Prefer `__new__` over `__init__` for determining callable type of a class · Issue #5647 · python/mypy
X Title: Prefer `__new__` over `__init__` for determining callable type of a class · Issue #5647 · python/mypy
Description: #5642 made __new__ chosen in more situations but __init__ is still chosen when one class defines both. The difficulty is that typeshed has a bunch of dodgy __new__ annotations that need to be cleaned up first.
Open Graph Description: #5642 made __new__ chosen in more situations but __init__ is still chosen when one class defines both. The difficulty is that typeshed has a bunch of dodgy __new__ annotations that need to be clean...
X Description: #5642 made __new__ chosen in more situations but __init__ is still chosen when one class defines both. The difficulty is that typeshed has a bunch of dodgy __new__ annotations that need to be clean...
Opengraph URL: https://github.com/python/mypy/issues/5647
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Prefer `__new__` over `__init__` for determining callable type of a class","articleBody":" #5642 made `__new__` chosen in more situations but `__init__` is still chosen when\r\none class defines both. The difficulty is that typeshed has a bunch of dodgy `__new__`\r\nannotations that need to be cleaned up first.","author":{"url":"https://github.com/msullivan","@type":"Person","name":"msullivan"},"datePublished":"2018-09-19T22:47:01Z","url":"https://github.com/python/mypy/issues/5647"}
| 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:4c8c61a3-0069-71e6-6c38-61496017e70c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | BD26:30CC09:2AAFCB4:39E1C1B:6B0049CF |
| html-safe-nonce | 1efdeeb9796543d6f5187bcc05a9258360bb1c7626714775decdf59183f70bdb |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJCRDI2OjMwQ0MwOToyQUFGQ0I0OjM5RTFDMUI6NkIwMDQ5Q0YiLCJ2aXNpdG9yX2lkIjoiNjY5MjU2MDk1NzQ1OTE1NTQwNyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | ca387e5d5d4ea21b6d0a67776c959884f6b5755a31edf03d6f828486f1bf3c3c |
| hovercard-subject-tag | issue:361955755 |
| 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/5647/issue_layout |
| twitter:image | https://opengraph.githubassets.com/2dd7b2bf17a509a3bbaf43ca4b288db1c4614148d33f3b9126750546c4b4bdb8/python/mypy/issues/5647 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/2dd7b2bf17a509a3bbaf43ca4b288db1c4614148d33f3b9126750546c4b4bdb8/python/mypy/issues/5647 |
| og:image:alt | #5642 made __new__ chosen in more situations but __init__ is still chosen when one class defines both. The difficulty is that typeshed has a bunch of dodgy __new__ annotations that need to be clean... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | msullivan |
| hostname | github.com |
| expected-hostname | github.com |
| None | f9517bf360d46638a1e5e7daee7158842fe5ef43c9000afa0e127564a7c2f39b |
| 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 | b27c5dde30676028abd5c5fc53ce5c9b625f8281 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width