Title: IntEnum "is not indexable" · Issue #4941 · python/mypy · GitHub
Open Graph Title: IntEnum "is not indexable" · Issue #4941 · python/mypy
X Title: IntEnum "is not indexable" · Issue #4941 · python/mypy
Description: from enum import IntEnum Color = IntEnum('Color', 'red green blue') Color['green'] ...yields: test.py:3: error: Value of type "Type[Color]" is not indexable This example is more or less straight out of the enum docs -- my expectation is ...
Open Graph Description: from enum import IntEnum Color = IntEnum('Color', 'red green blue') Color['green'] ...yields: test.py:3: error: Value of type "Type[Color]" is not indexable This example is more or less straight ou...
X Description: from enum import IntEnum Color = IntEnum('Color', 'red green blue') Color['green'] ...yields: test.py:3: error: Value of type "Type[Color]" is not indexable This e...
Opengraph URL: https://github.com/python/mypy/issues/4941
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"IntEnum \"is not indexable\"","articleBody":"```\r\nfrom enum import IntEnum\r\nColor = IntEnum('Color', 'red green blue')\r\nColor['green']\r\n```\r\n...yields:\r\n```\r\ntest.py:3: error: Value of type \"Type[Color]\" is not indexable\r\n```\r\n\r\nThis example is more or less [straight out of the enum docs](http://cpython-test-docs.readthedocs.io/en/latest/library/enum.html#programmatic-access-to-enumeration-members-and-their-attributes) -- my expectation is that it should not be a type error.\r\n\r\nMypy version 025e3decfaa95f42c721c4662cdf2dd748db06a3 ","author":{"url":"https://github.com/alexmv","@type":"Person","name":"alexmv"},"datePublished":"2018-04-19T19:57:42Z","url":"https://github.com/python/mypy/issues/4941"}
| 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:3ad12561-6436-24cd-fc0e-0fdfcf4248c5 |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | E096:29A20E:288306D:37333FA:6B0046C3 |
| html-safe-nonce | 6011bfd984be528b4309609e381b8d4415bbef38bf30fc9194610ff84173a7a1 |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiJFMDk2OjI5QTIwRToyODgzMDZEOjM3MzMzRkE6NkIwMDQ2QzMiLCJ2aXNpdG9yX2lkIjoiMTM0ODk5NTAzOTg2NjQwNjU5NSIsInJlZ2lvbl9lZGdlIjoiaWFkIiwicmVnaW9uX3JlbmRlciI6ImlhZCJ9 |
| visitor-hmac | 620a83a11cea0b55adb35ebcc985f9dbe514e9e90411df48bb2889cda15c8f00 |
| hovercard-subject-tag | issue:316019066 |
| 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/4941/issue_layout |
| twitter:image | https://opengraph.githubassets.com/421dfc4c98ccb59f72f660ca42d66cde0ff26d06c79a99cc7cf2f24e585b51b3/python/mypy/issues/4941 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/421dfc4c98ccb59f72f660ca42d66cde0ff26d06c79a99cc7cf2f24e585b51b3/python/mypy/issues/4941 |
| og:image:alt | from enum import IntEnum Color = IntEnum('Color', 'red green blue') Color['green'] ...yields: test.py:3: error: Value of type "Type[Color]" is not indexable This example is more or less straight ou... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | alexmv |
| hostname | github.com |
| expected-hostname | github.com |
| None | 7d0829bbde9e48b2486cb5dd6d147896eb01d32134627091f818958a935ef3f0 |
| 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 | f3f3a43ca095cdea3abbb394112e971f9fdb94fa |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
| react-app-name | issues |
Links:
Viewport: width=device-width