File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 66standard dataclasses module, with the following features:
77
881. Field-level mutability control:
9- - Use the `mutable_during_init` decorator to mark fields that should be mutable
10- during the initialization phase but become immutable after sealing.
9+
10+ Use the `mutable_during_init` decorator to mark fields that should be mutable
11+ during the initialization phase but become immutable after sealing.
1112
12132. Two-phase initialization:
14+
1315 - Objects start in an "initializing" state where designated fields can be modified.
1416 - Objects can be explicitly sealed to prevent further modification of any fields.
1517
16183. Circular reference support:
17- - Create objects, establish circular references between them, then seal
18- them together.
19+
20+ Create objects, establish circular references between them, then seal
21+ them together.
1922
20234. Backward compatibility:
21- - Objects are immutable by default, sealing occurs automatically at the end of
22- initialization unless explicitly deferred.
24+
25+ Objects are immutable by default, sealing occurs automatically at the end of
26+ initialization unless explicitly deferred.
2327
2428Limitations:
2529
You can’t perform that action at this time.
0 commit comments