Skip to content

gh-142414: Make value, not identity, matter for UNBOUND* objects - #145184

Closed
encukou wants to merge 3 commits into
python:mainfrom
encukou:unbound-not-singleton
Closed

gh-142414: Make value, not identity, matter for UNBOUND* objects#145184
encukou wants to merge 3 commits into
python:mainfrom
encukou:unbound-not-singleton

Conversation

@encukou

@encukouencukou commented Feb 24, 2026

Copy link
Copy Markdown
Member

I realize there's a pile of PRs for the issue already,

I couldn't find a reason why the singletons (UNBOUND, UNBOUND_ERROR, UNBOUND_REMOVE) need to be singletons. Each is essentially a name for the underlying int (used in the C layer); plus UNBOUND doubles as the replacement value but that's not the issue here.
I also couldn't find a reason to have different UNBOUND objects in different modules.

This converts them to a normal class, and compares by value rather than identity.

encukouand others added 2 commits February 24, 2026 17:00
Sign up for freeto 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

@encukou@note35