jangada.serialization.SerializableProperty.writeonce#
- property SerializableProperty.writeonce: bool#
Whether this property can only be set once.
- Returns:
- bool
True if the property is write-once, False otherwise.
Notes
This is a read-only property of the descriptor. The write-once flag is set during descriptor creation and cannot be changed afterward.
Examples
>>> class MyClass: ... immutable = SerializableProperty(writeonce=True) ... mutable = SerializableProperty(writeonce=False) ... >>> MyClass.immutable.writeonce True >>> MyClass.mutable.writeonce False