Skip to content

gh-141510: Change repr(frozendict) for empty dict#144921

Open
vstinner wants to merge 2 commits intopython:mainfrom
vstinner:frozendict_repr_empty
Open

gh-141510: Change repr(frozendict) for empty dict#144921
vstinner wants to merge 2 commits intopython:mainfrom
vstinner:frozendict_repr_empty

Conversation

@vstinner
Copy link
Member

@vstinner vstinner commented Feb 17, 2026

repr(frozendict()) returns "frozendict()" instead of "frozendict({})".

repr(frozendict()) returns "frozendict()" instead of
"frozendict({})".
@vstinner
Copy link
Member Author

For example, frozenset has a similar formatting:

>>> frozenset()  # empty
frozenset()
>>> frozenset("a")
frozenset({'a'})

Copy link
Member

@corona10 corona10 left a comment

Choose a reason for hiding this comment

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

lgtm

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.

2 participants