Skip to content

Fix equality comparisons on frozen dicts / lists - #3657

Open
peterebden wants to merge 3 commits into
thought-machine:masterfrom
peterebden:freeze-fixes
Open

peterebden wants to merge 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
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