← 返回首页
bpo-40521: Empty frozenset is no longer a singleton by rhettinger · Pull Request #21085 · python/cpython · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus

bpo-40521: Empty frozenset is no longer a singleton#21085

Merged
vstinner merged 3 commits into
python:masterfrom
rhettinger:empty_frozenset
Jun 23, 2020
Merged

bpo-40521: Empty frozenset is no longer a singleton#21085
vstinner merged 3 commits into
python:masterfrom
rhettinger:empty_frozenset

Conversation

rhettinger commented Jun 23, 2020
edited by bedevere-bot
Loading

Copy link
Copy Markdown
Contributor

Making the empty frozenset a singleton wasn't worth it. Unlike empty strings and empty tuples, these are not common and don't warrant a special case. Taking it out makes the code simpler.

https://bugs.python.org/issue40521

vstinner left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Choose a reason Spam Abuse Off Topic Outdated Duplicate Resolved Low Quality Hide comment

LGTM.

Copy link
Copy Markdown
Member

I merged the PR since I'm working on other changes which are in conflict with this PR, like PR #21086.

fasih pushed a commit to fasih/cpython that referenced this pull request Jun 29, 2020
* Revert "bpo-40521: Make the empty frozenset per interpreter (pythonGH-21068)" This reverts commit 261cfed. * bpo-40521: Empty frozensets are no longer singletons * Complete the removal of the frozenset singleton
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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants

Footer

© 2026 GitHub, Inc.