lock_properties
- class ipkiss3.all.lock_properties
Makes all properties of a StrongPropertyInitializer subclass read-only.
- Returns:
- The same class, but with read-only properties.
Examples
Use as a decorator:
from ipcore.all import StrongPropertyInitializer, IntProperty, PositiveNumberProperty, lock_properties # parametric class class MySPI(StrongPropertyInitializer): a = IntProperty(default=1) b = PositiveNumberProperty() def _default_b(self): return self.a * 2 # Create a Read-only subclass @lock_properties() class MyFixedSPI(MySPI): def _default_a(self): # override default of a return 4