Title: Returning Undefined value doesn't get flagged as error · Issue #551 · python/mypy · GitHub
Open Graph Title: Returning Undefined value doesn't get flagged as error · Issue #551 · python/mypy
X Title: Returning Undefined value doesn't get flagged as error · Issue #551 · python/mypy
Description: This gets no errors: def words(s: str) -> Dict[str, int]: x = Undefined(Dict[str, int]) return x Shouldn't it be an error to return an undefined value?
Open Graph Description: This gets no errors: def words(s: str) -> Dict[str, int]: x = Undefined(Dict[str, int]) return x Shouldn't it be an error to return an undefined value?
X Description: This gets no errors: def words(s: str) -> Dict[str, int]: x = Undefined(Dict[str, int]) return x Shouldn't it be an error to return an undefined value?
Opengraph URL: https://github.com/python/mypy/issues/551
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Returning Undefined value doesn't get flagged as error","articleBody":"This gets no errors:\n\n```\ndef words(s: str) -> Dict[str, int]:\n x = Undefined(Dict[str, int])\n return x\n```\n\nShouldn't it be an error to return an undefined value?\n","author":{"url":"https://github.com/gvanrossum","@type":"Person","name":"gvanrossum"},"datePublished":"2015-01-07T18:15:40Z","url":"https://github.com/python/mypy/issues/551"}
| 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:82f79100-be79-b54c-fe8d-0d04b3151598 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DAC6:1C605E:415893:5B7D89:6B006FC6 |
| html-safe-nonce | 3bf465ea6521b5ca4df1cdabbaeaa0ea69495a4d8a68175f38bc00567697e208 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJEQUM2OjFDNjA1RTo0MTU4OTM6NUI3RDg5OjZCMDA2RkM2IiwidmlzaXRvcl9pZCI6IjY2NDcwMDI5ODA5MjUwNzUzOTgiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | 1387bc27164a40662062b8aff4d764542fa71a8ea1abcc10eaa3b0cae6a30f9a |
| hovercard-subject-tag | issue:53663126 |
| 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/551/issue_layout |
| twitter:image | https://opengraph.githubassets.com/b4de31c8cb8afcf93fc47a1e4e2dc8ade4e1e1dd0318210367f2e4deefc485f9/python/mypy/issues/551 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/b4de31c8cb8afcf93fc47a1e4e2dc8ade4e1e1dd0318210367f2e4deefc485f9/python/mypy/issues/551 |
| og:image:alt | This gets no errors: def words(s: str) -> Dict[str, int]: x = Undefined(Dict[str, int]) return x Shouldn't it be an error to return an undefined value? |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | gvanrossum |
| hostname | github.com |
| expected-hostname | github.com |
| None | 6527e91c60c0b29d16606ff32ac5df8ecdc37a2a62205ea057a14d7762c870fa |
| 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 | 46f1cd2ae3cd8ae1a81019b5d619742e76f13bbd |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width