Title: Allow __init__ with signature but no return type · Issue #604 · python/mypy · GitHub
Open Graph Title: Allow __init__ with signature but no return type · Issue #604 · python/mypy
X Title: Allow __init__ with signature but no return type · Issue #604 · python/mypy
Description: Code: class Visitor: def __init__(self, a: int): pass Error: x.py: In member "__init__" of class "Visitor": x.py, line 2: Cannot define return type for "__init__" The return type is Any (implicitly), and Any should be a valid return type...
Open Graph Description: Code: class Visitor: def __init__(self, a: int): pass Error: x.py: In member "__init__" of class "Visitor": x.py, line 2: Cannot define return type for "__init__" The return type is Any (implicitly...
X Description: Code: class Visitor: def __init__(self, a: int): pass Error: x.py: In member "__init__" of class "Visitor": x.py, line 2: Cannot define return type for "__init__" The ...
Opengraph URL: https://github.com/python/mypy/issues/604
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Allow __init__ with signature but no return type","articleBody":"Code:\n\n```\nclass Visitor:\n def __init__(self, a: int):\n pass\n```\n\nError:\n\n```\nx.py: In member \"__init__\" of class \"Visitor\":\nx.py, line 2: Cannot define return type for \"__init__\"\n```\n\nThe return type is `Any` (implicitly), and `Any` should be a valid return type for `__init__`.\n\nThis was reported by Guido.\n","author":{"url":"https://github.com/JukkaL","@type":"Person","name":"JukkaL"},"datePublished":"2015-03-18T04:19:34.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":41},"url":"https://github.com/604/mypy/issues/604"}
| 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:ec23699f-3f9d-5d69-92c8-8bfd97f463dc |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | ABF0:1327C8:F710CD:1588B09:6968E5CD |
| html-safe-nonce | 6c3048748a2eafb5a944a9246814bc2e7a4591c6d8fa9f07cf431a8d24f1342b |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBQkYwOjEzMjdDODpGNzEwQ0Q6MTU4OEIwOTo2OTY4RTVDRCIsInZpc2l0b3JfaWQiOiIyMDEzNjY1ODg2MzAyOTU0OTU3IiwicmVnaW9uX2VkZ2UiOiJpYWQiLCJyZWdpb25fcmVuZGVyIjoiaWFkIn0= |
| visitor-hmac | f7f8d381bd57daf02448a40afcb871b809edd869bcf5ac55c997bb0f029eb3fe |
| hovercard-subject-tag | issue:62585365 |
| 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/604/issue_layout |
| twitter:image | https://opengraph.githubassets.com/45dcac51127f83fac21574878a8a02e7afe6d4db5704a1fb47e225e02ae6902c/python/mypy/issues/604 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/45dcac51127f83fac21574878a8a02e7afe6d4db5704a1fb47e225e02ae6902c/python/mypy/issues/604 |
| og:image:alt | Code: class Visitor: def __init__(self, a: int): pass Error: x.py: In member "__init__" of class "Visitor": x.py, line 2: Cannot define return type for "__init__" The return type is Any (implicitly... |
| 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 | b5416305695900bdab7d289f90ea3d96bf36397112f2ab16f5a5a120f38de085 |
| 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 | 366035abf3d5b1e31841c97e2fa2ce02a3007a7b |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width