Skip to content

Conversation

Copy link
Contributor

Copilot AI commented Nov 28, 2025

FrozenDict implements __hash__ but not __eq__, violating Python's hashable object contract.

Changes

  • Add __eq__ method to FrozenDict that compares underlying root dicts
  • Supports comparison with both FrozenDict instances and regular dicts
fd1 = FrozenDict({"a": 1})
fd2 = FrozenDict({"a": 1})
assert fd1 == fd2  # Now works correctly
assert fd1 == {"a": 1}  # Also works

✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.

Copilot AI changed the title [WIP] Address feedback on mini-transformer example PR Add __eq__ method to FrozenDict class Nov 28, 2025
Copilot AI requested a review from findmyway November 28, 2025 02:27
@findmyway findmyway marked this pull request as ready for review November 28, 2025 13:07
@findmyway findmyway merged commit dd898b8 into dev Nov 28, 2025
@findmyway findmyway deleted the copilot/sub-pr-1-another-one branch November 28, 2025 13:07
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.

2 participants