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

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

Conversation

@encukou

@encukou encukou 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.

encukou and others added 2 commits February 24, 2026 17:00
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

2 participants