You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, fastcore.xml.FT instances appear to compare by identity rather than value. This behavior can make tasks like testing more complex. For example, fastcore.xml.FT("a", ("b",)) == fastcore.xml.FT("a", ("b",)) comes out False, which requires workarounds such as custom comparison helpers in tests. Implementing an __eq__ method in FT that compares instances based on their tag, attrs, and children would simplify these scenarios by enabling direct, intuitive value-based equality.
This change will require adding a corresponding __hash__ method if these objects are intended to be hashable.