This should raise an exception: class C(Component): x = compute(lambda self: 1) c = C(x=5) c2 = C() c2.x = 10