Title: Support enums in unions per PEP 484 · Issue #1803 · python/mypy · GitHub
Open Graph Title: Support enums in unions per PEP 484 · Issue #1803 · python/mypy
X Title: Support enums in unions per PEP 484 · Issue #1803 · python/mypy
Description: See this PR for PEP 484: python/typing#240 Because we know that Enum classes cannot be further subclassed, picking apart a value that could be a specific enum or some other type by comparing to all possible values of the enum should be e...
Open Graph Description: See this PR for PEP 484: python/typing#240 Because we know that Enum classes cannot be further subclassed, picking apart a value that could be a specific enum or some other type by comparing to all...
X Description: See this PR for PEP 484: python/typing#240 Because we know that Enum classes cannot be further subclassed, picking apart a value that could be a specific enum or some other type by comparing to all...
Opengraph URL: https://github.com/python/mypy/issues/1803
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Support enums in unions per PEP 484","articleBody":"See this PR for PEP 484: https://github.com/python/typing/pull/240\n\nBecause we know that Enum classes cannot be further subclassed, picking apart a value that could be a specific enum or some other type by comparing to all possible values of the enum should be enough to conclude that in the \"else\" clause the value cannot be an instance of that enum any more, so it must be the other type (examples in the linked PEP section).\n","author":{"url":"https://github.com/gvanrossum","@type":"Person","name":"gvanrossum"},"datePublished":"2016-07-05T16:39:27Z","url":"https://github.com/python/mypy/issues/1803"}
| 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:89c6ffc9-f313-0bb3-bdae-3c1fd5f1baa0 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | DF38:370586:1E9FFB:2AC4F8:6B005748 |
| html-safe-nonce | 3929fba0c27160ca4f20ced2c951c9372825c92dbd83ae8c6515b838f7008f45 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJERjM4OjM3MDU4NjoxRTlGRkI6MkFDNEY4OjZCMDA1NzQ4IiwidmlzaXRvcl9pZCI6IjU3Njg5NzQ0NzE0ODIzMzMwMDEiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | a3fb89f588357047d499b4e2ca75ba3bb9ee7076696ad8046bbe749a4e7f53f8 |
| hovercard-subject-tag | issue:163894237 |
| 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/1803/issue_layout |
| twitter:image | https://opengraph.githubassets.com/f04307e40392a244038418645f2be5c1e87cf3c20bcfd278482f43ae5336e11f/python/mypy/issues/1803 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/f04307e40392a244038418645f2be5c1e87cf3c20bcfd278482f43ae5336e11f/python/mypy/issues/1803 |
| og:image:alt | See this PR for PEP 484: python/typing#240 Because we know that Enum classes cannot be further subclassed, picking apart a value that could be a specific enum or some other type by comparing to all... |
| 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 | f420f4996e6b1ff1ccd6d7683f8134f4b5f0f8a50124c210dbfe7490e5644abb |
| 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 | 26e00df917aba0f128135dc073ea0c5e33a70d40 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width