gh-141510: Support frozendict in pprint#144908
Merged
vstinner merged 7 commits intopython:mainfrom Feb 21, 2026
Merged
Conversation
Member
Author
|
cc @freddrake |
Member
serhiy-storchaka
left a comment
There was a problem hiding this comment.
What about frozendict views?
Member
|
frozendict views are standard dict views. |
Co-authored-by: devdanzin <74280297+devdanzin@users.noreply.github.com>
Member
Author
|
I completed the PR. Please review again.
I added multiple tests on keys(), values() and items(). |
serhiy-storchaka
approved these changes
Feb 21, 2026
Member
serhiy-storchaka
left a comment
There was a problem hiding this comment.
LGTM if all new code is covered by tests.
| return "{%s}" % ", ".join(components), readable, recursive | ||
| rep = "{%s}" % ", ".join(components) | ||
| if is_frozendict: | ||
| rep = f"{object.__class__.__name__}({rep})" |
Member
There was a problem hiding this comment.
Is it covered by tests?
Member
Author
There was a problem hiding this comment.
This line is coverted by test_basic_line_wrap() and test_same_as_repr() tests. If I modify the code to raise an exception, both tests fail.
Member
Author
|
Merged. Thanks for reviews! Thanks for your contribution @devdanzin! |
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Uh oh!
There was an error while loading. Please reload this page.