I'm sweeping through all the Traits in a large program, and many of our traits are synchronized. For example, consider HasTrait objects of the structure:
a = Material1.ShellMaterial
b = Material2.CoreMaterial
c = Material3.MaterialX
In our application, it turns out that a and c are synchronized traits. In other words, Material3.MaterialX
is the same as Material1.ShellMaterial
, and they have set using sync_trait()
(HasTraits API).
Is it possible to inspect a,b,c and dynamically determine that a and c are synchronized?
The goal is to plot all of these, but hide redundant plots from the user. Typical comparisons between these like a==c
return False
, despite these objects representing the same data.