Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

gh-98250: Improve documentation about change to Enum.__format__ #98261

Closed
wants to merge 2 commits into from

Conversation

mdboom
Copy link
Contributor

@mdboom mdboom commented Oct 14, 2022

@bedevere-bot bedevere-bot added awaiting review docs Documentation in the Doc dir skip news labels Oct 14, 2022
@mdboom mdboom added needs backport to 3.11 only security fixes and removed docs Documentation in the Doc dir labels Oct 14, 2022
@mdboom mdboom requested a review from ethanfurman October 14, 2022 14:26
@@ -624,6 +624,11 @@ enum

* ``EnumMeta`` renamed to ``EnumType`` (``EnumMeta`` kept as alias).

* The output of ``Enum.__format__`` has changed to include both the enum name
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Might be worth adding explicitly that this affects enums included in f-strings, since that may not be obvious to a lot of readers.

@CAM-Gerlach
Copy link
Member

Hey, I missed seeing this before I submitted #98295 , but it turns out I noticed a similar issue, as the What's New was not entirely clear on that point, and had already made some enhancements in that regard. I went ahead and made some further improvements and expansions there to more comprehensively address #98250 and incorporate the intent of the changes here, alongside @JelleZijlstra 's suggestion and a number of additional fixes and clarifications.

As that PR essentially rewrites that section and will thus conflict with this one, which I'm still not sure is quite right (as ReprEnum appears to do something quite different from the old __format__ behavior, and there are also still a few smaller points of confusion here), my suggestion would be to consolidate on that one (especially since we don't have much time left before the release), and I'd welcome your review and suggestions over there.

@mdboom
Copy link
Contributor Author

mdboom commented Oct 17, 2022

Closing in favor of the more comprehensive #98295.

@mdboom mdboom closed this Oct 17, 2022
@mdboom mdboom deleted the strenum-info branch December 22, 2022 15:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants