Title: No error for implicitly defined return value · Issue #1869 · python/mypy · GitHub
Open Graph Title: No error for implicitly defined return value · Issue #1869 · python/mypy
X Title: No error for implicitly defined return value · Issue #1869 · python/mypy
Description: Correct me if this issue has already been addressed, but I found the no error for an implicitly defined return value troubling. It seems as if this would not be static typing because the return value should explicitly defined (whatever i...
Open Graph Description: Correct me if this issue has already been addressed, but I found the no error for an implicitly defined return value troubling. It seems as if this would not be static typing because the return val...
X Description: Correct me if this issue has already been addressed, but I found the no error for an implicitly defined return value troubling. It seems as if this would not be static typing because the return val...
Opengraph URL: https://github.com/python/mypy/issues/1869
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"No error for implicitly defined return value","articleBody":"Correct me if this issue has already been addressed, but I found the no error for an implicitly defined return value troubling. It seems as if this would _not_ be static typing because the return value should explicitly defined (whatever it is) for statically typed languages.\n\nI think there should be a difference between these two functions when run through the parser, in that the second one should raise an error for not having an explicitly defined return value:\n\n``` python\ndef f() -> None:\n print('Hello world')\n\ndef g():\n print('Hello world')\n```\n\nIn statically typed languages like Java, return values must be explicitly defined, whether they are `void`, `String`s, or primitive data types, for instance:\n\n``` java\npublic void test1() {\n System.out.println(\"Hello world\");\n}\n```\n","author":{"url":"https://github.com/shreydesai","@type":"Person","name":"shreydesai"},"datePublished":"2016-07-15T01:55:34Z","url":"https://github.com/python/mypy/issues/1869"}
| 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:5a640b92-a1ca-47d7-43c0-29842ee15dcf |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | D5EE:194E10:1D20AC3:276F8D3:6B000B75 |
| html-safe-nonce | e3520ea18defc27860ab80917f9987015fbcf384b6ce8fac56cbd62af13d1560 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJENUVFOjE5NEUxMDoxRDIwQUMzOjI3NkY4RDM6NkIwMDBCNzUiLCJ2aXNpdG9yX2lkIjoiODMxOTI3NTE4MjI1NDQ1OTc2NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 49515d8c3088903dd841a93dfb9fc9496bed2794e92772b6b3f154a17b74a964 |
| hovercard-subject-tag | issue:165695687 |
| 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/1869/issue_layout |
| twitter:image | https://opengraph.githubassets.com/3871aeb2e14298570abf1384942d98ef907c75e0362502e3f4d9d729d7b8f0eb/python/mypy/issues/1869 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/3871aeb2e14298570abf1384942d98ef907c75e0362502e3f4d9d729d7b8f0eb/python/mypy/issues/1869 |
| og:image:alt | Correct me if this issue has already been addressed, but I found the no error for an implicitly defined return value troubling. It seems as if this would not be static typing because the return val... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | shreydesai |
| hostname | github.com |
| expected-hostname | github.com |
| None | 0a0d8686a27478df474dd7415776a7a080cde8838b3cd92ea7601187572e5729 |
| 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 | 16a11879678aaf97e2a42c33ee70830aa084fa37 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width