GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — gh-98250: Improve documentation about change to Enum.__format__ by mdboom · Pull Request #98261 · python/cpython

Conversation

@mdboom

@mdboom mdboom commented Oct 14, 2022 •
edited by bedevere-bot
Loading

Uh oh!

There was an error while loading. Please reload this page.

Copy link
Copy Markdown
Contributor
  • Issue: Enum.__str__ change could be improved in What's New #98250

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
@mdboom
pythongh-98250: Improve documentation about change to Enum.__format__
3cd6e55
@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
JelleZijlstra
JelleZijlstra reviewed Oct 15, 2022
View reviewed changes
Comment thread Doc/whatsnew/3.11.rst Outdated

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

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

@JelleZijlstra JelleZijlstra Oct 15, 2022

Copy link
Copy Markdown
Member

There was a problem hiding this comment.

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
This was referenced Oct 15, 2022
Edit What's New for Python 3.11 #95913
Closed
gh-95913: Copyedit, xref and organize enum section #98295
Merged
@CAM-Gerlach

CAM-Gerlach commented Oct 15, 2022

Copy link
Copy Markdown
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.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@mdboom
Add note about __format__ used in f-strings
b35a09a
@mdboom

mdboom commented Oct 17, 2022

Copy link
Copy Markdown
Contributor Author

Closing in favor of the more comprehensive #98295.

CAM-Gerlach reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@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

Reviewers

@JelleZijlstra JelleZijlstra JelleZijlstra left review comments
@ethanfurman ethanfurman Awaiting requested review from ethanfurman

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

awaiting review needs backport to 3.11 only security fixes skip news

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Uh oh!

There was an error while loading. Please reload this page.

4 participants

@mdboom @CAM-Gerlach @JelleZijlstra @bedevere-bot
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.