[Bugfix] Color type missing __eq__/__ne__ despite having __hash__ #307
Labels
No labels
Alpha Release Requirement
Bugfix
Demo Target
Documentation
Major Feature
Minor Feature
priority:tier1-active
priority:tier2-foundation
priority:tier3-future
priority:tier4-deferred
Refactoring & Cleanup
system:animation
system:documentation
system:grid
system:input
system:performance
system:procgen
system:python-binding
system:rendering
system:ui-hierarchy
Tiny Feature
workflow:blocked
workflow:needs-benchmark
workflow:needs-documentation
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
john/McRogueFace#307
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
Context
The API consistency audit (docs/api-audit-2026-04.md, finding F6) identified that
Colorhas__hash__but no__eq__/__ne__implementation (tp_richcompare). This means two Color objects with identical RGBA values may not compare equal using==.This violates the Python convention that objects with
__hash__should also implement__eq__.Expected Behavior
Action Items
tp_richcomparetoPyColorType(compare r, g, b, a fields)Files
src/PyColor.h(type definition)src/PyColor.cpp(implement richcompare)