Title: [Enum] call syntax error message is confusing · Issue #92647 · python/cpython · GitHub
Open Graph Title: [Enum] call syntax error message is confusing · Issue #92647 · python/cpython
X Title: [Enum] call syntax error message is confusing · Issue #92647 · python/cpython
Description: Using call syntax with an Enum has two possibilities: creating a new enum from a previous enum (good for inheriting behavior, etc.) looking up a member in a final enum Which should be used is determined by the number of arguments: one me...
Open Graph Description: Using call syntax with an Enum has two possibilities: creating a new enum from a previous enum (good for inheriting behavior, etc.) looking up a member in a final enum Which should be used is deter...
X Description: Using call syntax with an Enum has two possibilities: creating a new enum from a previous enum (good for inheriting behavior, etc.) looking up a member in a final enum Which should be used is deter...
Opengraph URL: https://github.com/python/cpython/issues/92647
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"[Enum] call syntax error message is confusing","articleBody":"Using call syntax with an Enum has two possibilities:\r\n\r\n- creating a new enum from a previous enum (good for inheriting behavior, etc.)\r\n- looking up a member in a final enum\r\n\r\nWhich should be used is determined by the number of arguments: one means lookup, more than one means creation. However, if the enum was created using multiple values, and the lookup call erroneously passes multiple values instead of one tuple with those multiple values, then the creation branch is chosen and the resulting error message is less than useful.\r\n\r\nWhich branch to take should be determined by whether the enum is final (has members).\r\n\r\n\u003c!-- gh-linked-prs --\u003e\r\n### Linked PRs\r\n- gh-99500\r\n\u003c!-- /gh-linked-prs --\u003e\r\n","author":{"url":"https://github.com/ethanfurman","@type":"Person","name":"ethanfurman"},"datePublished":"2022-05-10T22:48:22.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":0},"url":"https://github.com/92647/cpython/issues/92647"}
| 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:712c6bb4-3642-7e75-9fe5-192ec5a60fd1 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | AEAA:1C4E31:147F1D7:1C18500:69694CD3 |
| html-safe-nonce | 81f73d1a09fdfaf28c0b24e6e31d603f57267fbd852a356c62f020fb36fa52a7 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJBRUFBOjFDNEUzMToxNDdGMUQ3OjFDMTg1MDA6Njk2OTRDRDMiLCJ2aXNpdG9yX2lkIjoiOTE2NjIxMzkzNTI0MzI4MzY2NyIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 6568356fd97ce52d564bf171d79b6f616678871a77848a9bdd02c471021c8744 |
| hovercard-subject-tag | issue:1231780058 |
| 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/cpython/92647/issue_layout |
| twitter:image | https://opengraph.githubassets.com/282e61cd0623c2fe2659b18bd9fd6d61461fb762defa4cc50c34ff6d57d8eddb/python/cpython/issues/92647 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/282e61cd0623c2fe2659b18bd9fd6d61461fb762defa4cc50c34ff6d57d8eddb/python/cpython/issues/92647 |
| og:image:alt | Using call syntax with an Enum has two possibilities: creating a new enum from a previous enum (good for inheriting behavior, etc.) looking up a member in a final enum Which should be used is deter... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | ethanfurman |
| hostname | github.com |
| expected-hostname | github.com |
| None | 54182691a21263b584d2e600b758e081b0ff1d10ffc0d2eefa51cf754b43b51d |
| turbo-cache-control | no-preview |
| go-import | github.com/python/cpython git https://github.com/python/cpython.git |
| octolytics-dimension-user_id | 1525981 |
| octolytics-dimension-user_login | python |
| octolytics-dimension-repository_id | 81598961 |
| octolytics-dimension-repository_nwo | python/cpython |
| octolytics-dimension-repository_public | true |
| octolytics-dimension-repository_is_fork | false |
| octolytics-dimension-repository_network_root_id | 81598961 |
| octolytics-dimension-repository_network_root_nwo | python/cpython |
| 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 | d69ac0477df0f87da03b8b06cebd187012d7a930 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width