Title: Document new 3.11 enum APIs (ReprEnum, global_* and/or show_flag_values) · Issue #98298 · python/cpython · GitHub
Open Graph Title: Document new 3.11 enum APIs (ReprEnum, global_* and/or show_flag_values) · Issue #98298 · python/cpython
X Title: Document new 3.11 enum APIs (ReprEnum, global_* and/or show_flag_values) · Issue #98298 · python/cpython
Description: As discovered in #98295 , there are several undocumented new APIs in the enum module: ReprEnum and is documented in What's New (and exported in __all__), but not anywhere in the enum library module documentation, which seems like an over...
Open Graph Description: As discovered in #98295 , there are several undocumented new APIs in the enum module: ReprEnum and is documented in What's New (and exported in __all__), but not anywhere in the enum library module...
X Description: As discovered in #98295 , there are several undocumented new APIs in the enum module: ReprEnum and is documented in What's New (and exported in __all__), but not anywhere in the enum library mo...
Opengraph URL: https://github.com/python/cpython/issues/98298
X: @github
Domain: github.com
{"@context":"https://schema.org","@type":"DiscussionForumPosting","headline":"Document new 3.11 enum APIs (ReprEnum, global_* and/or show_flag_values)","articleBody":"As discovered in #98295 , there are several undocumented new APIs in the `enum` module:\r\n\r\n* `ReprEnum` and is documented in [What's New](https://docs.python.org/3.11/whatsnew/3.11.html#enum) (and exported in `__all__`), but not anywhere in the [enum library module documentation](https://docs.python.org/3.11/library/enum.html#enum.StrEnum), which seems like an oversight.\r\n* Likewise, `global_enum` is documented in What's New (and exported in `__all__`) and was previously documented in the library docs, but that documentation was reverted in #30637 , and not restored, so I'm unsure on the current status.\r\n* `global_str`, `global_enum_repr` and `global_flag_repr` were added (to replace the `__str__()` and `__repr__()` of the appropriate classes) and are not marked as private (`_`) and are exported by `__all__`, but aren't documented either. Should they be?\r\n* `show_flag_values` was added and is not in `__all__`, but its use is referred to in an error message (cited in the docs) and it is not marked private (`_`). Should this be documented as well?\r\n\r\n@ethanfurman your guidance here would be much appreciated, thanks. I'm happy to review/copyedit a PR, or if you prefer, I can draft something and you review it. Ideally, we should get this in before the 3.11 release in a week or so...\r\n\r\nRelated: #95913 \n\n\u003c!-- gh-linked-prs --\u003e\n### Linked PRs\n* gh-103163\n* gh-103227\n\u003c!-- /gh-linked-prs --\u003e\n","author":{"url":"https://github.com/CAM-Gerlach","@type":"Person","name":"CAM-Gerlach"},"datePublished":"2022-10-15T20:43:31.000Z","interactionStatistic":{"@type":"InteractionCounter","interactionType":"https://schema.org/CommentAction","userInteractionCount":9},"url":"https://github.com/98298/cpython/issues/98298"}
| 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:3dabc68f-975a-fcfb-ae9a-e9f26de0ad6c |
| current-catalog-service-hash | 81bb79d38c15960b92d99bca9288a9108c7a47b18f2423d0f6438c5b7bcd2114 |
| request-id | 9938:32294B:1DF68F:282A2F:6969676F |
| html-safe-nonce | a67f24e0a4c1690c1625593672ae1e15477e1b2cabd811137cb01262b225efaa |
| visitor-payload | eyJyZWZlcnJlciI6IiIsInJlcXVlc3RfaWQiOiI5OTM4OjMyMjk0QjoxREY2OEY6MjgyQTJGOjY5Njk2NzZGIiwidmlzaXRvcl9pZCI6IjMzNDE2OTE0NTA5MjYxMzEwNTUiLCJyZWdpb25fZWRnZSI6ImlhZCIsInJlZ2lvbl9yZW5kZXIiOiJpYWQifQ== |
| visitor-hmac | dd4c08bcb85eca30e58ac60ef78a7ab54499c2834ee22181ba75ef5b26b00090 |
| hovercard-subject-tag | issue:1410285668 |
| 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/98298/issue_layout |
| twitter:image | https://opengraph.githubassets.com/8acfb173c53eafac830d340169dcd051f99f97ce2349a9a98816355efc15e754/python/cpython/issues/98298 |
| twitter:card | summary_large_image |
| og:image | https://opengraph.githubassets.com/8acfb173c53eafac830d340169dcd051f99f97ce2349a9a98816355efc15e754/python/cpython/issues/98298 |
| og:image:alt | As discovered in #98295 , there are several undocumented new APIs in the enum module: ReprEnum and is documented in What's New (and exported in __all__), but not anywhere in the enum library module... |
| og:image:width | 1200 |
| og:image:height | 600 |
| og:site_name | GitHub |
| og:type | object |
| og:author:username | CAM-Gerlach |
| hostname | github.com |
| expected-hostname | github.com |
| None | c6f193beb8ff08443adc07685d75302ab8aaf0a135f6e251c3ff3112c8deb881 |
| 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 | ec4d88fbe7ed62446d90b0a6d8e6db4248a8f8b8 |
| ui-target | full |
| theme-color | #1e2327 |
| color-scheme | light dark |
Links:
Viewport: width=device-width