hydra.overlay.python.lib.equality module
Python implementations of hydra.overlay.python.lib.equality primitives.
- hydra.overlay.python.lib.equality.equal(a: Any, b: Any) bool
Check if two values are equal.
Delegates entirely to the shared structural comparator (hydra.overlay.python.util ._compare, also used by hydra.overlay.python.lib.ordering.compare) rather than native
==: thea -> a -> Boolprimitive signature is polymorphic, soa/bhere are often raw (undecoded)Termvalues, not native Python values – native==on aTermrecurses via dataclass field equality and reaches native==on any Decimal/float leaf, which is scale-blind for Decimal and not Hydra’s extended totalOrder for float (NaN != NaN; -0.0 == 0.0), silently wrong per docs/ specification/ordering-and-equality.md._compare_termsalready handles both cases correctly at any nesting depth (map/set/record values included).