Skip to content

Fix equality comparisons on frozen dicts / lists - #3657

Merged
peterebden merged 3 commits into
thought-machine:masterfrom
peterebden:freeze-fixes
Nov 11, 2026
Merged

peterebden merged 3 commits into
thought-machine:masterfrom
peterebden:freeze-fixes

Conversation

@peterebden

@peterebden peterebden commented Nov 9, 2026 •

Copy link
Copy Markdown
Collaborator

Found this while working on #3656; equality comparisons never compare equal for frozen lists or dicts (they really should do if they have the same contents).

This fixes by adding an Equals method on pyObject which can implement this sensibly, losing the reflect.DeepEqual call. It's more code but I think better.

Comment thread src/parse/asp/equality_test.go Resolved
Comment thread src/parse/asp/equality_test.go Resolved
Comment thread src/parse/asp/objects.go Resolved
@peterebden peterebden mentioned this pull request Nov 10, 2026
@peterebden
peterebden merged commit a78a07f into thought-machine:master Nov 11, 2026
15 checks passed
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.

3 participants