-
-
Notifications
You must be signed in to change notification settings - Fork 31.5k
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
bpo-40066: [Enum] update str() and format() output #30582
Merged
Merged
Changes from all commits
Commits
Show all changes
26 commits
Select commit
Hold shift + click to select a range
88b2a25
convert tests to PEP-663
ethanfurman 22e8e2f
wip
ethanfurman 881a694
wip
ethanfurman 6cdaa91
wip
ethanfurman 3a17995
wip
ethanfurman 6ff602a
wip
ethanfurman 65a0e31
wip
ethanfurman 06f0dc8
wip
ethanfurman 13c4b92
update __doc__
ethanfurman 7072a3f
fix role
ethanfurman 56647c5
support different display bases for unnamed flag values
ethanfurman ab4598c
undo PEP 663 library changes
ethanfurman 7b6b17b
adjust internal whitespace in error messages
ethanfurman bb0c67e
test new doc strings
ethanfurman 837c211
fix "cannoct extend" error; remove dead code
ethanfurman d36aeda
minor fixes
ethanfurman cff9b90
fix ssl docs
ethanfurman 2036918
use standard IntEnum and IntFlag
ethanfurman 94e1c64
update test_unicode
ethanfurman 7f99e84
reset PlistFormat to pre-PEP663
ethanfurman f83f59d
fix docs
ethanfurman 6d54605
doc updates
ethanfurman 515698e
update docs
ethanfurman 2831f99
skip failing doctest because doctest is dumb
ethanfurman 03c1cfc
fix doctest test
ethanfurman de6ffde
another try
ethanfurman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
Large diffs are not rendered by default.
Oops, something went wrong.
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
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.
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.
Is that inheritting correct where the values are changed to str?
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.
@gryznar Good question: only because the
__new__
uses integers as the values, and the "value" on the assignment line is saved in thedescription
attribute. Without the custom__new__
the enum creation would have failed, since strings are not integers.