class SimpleProperty(HasTraits): x = Int y = Property(Int, depends_on="x") def _get_y(self): return self.x + 1
class A(HasTraits): prop = Property()
class Presenter(HasTraits): obj = Instance(Dummy) y = Property(Int(), depends_on="obj.x") def _get_y(self): return self.obj.x
class DelegateLeak(HasTraits): visible = Property(Bool, depends_on="can_enable") can_enable = DelegatesTo("flag", prefix="x") flag = Instance(Dummy, kw={"x": 42})