- class tpcp.CloneFactory(default_value: T)[source]#
Init factory that creates a clone of the provided default values on instance initialisation.
This can be used to make sure that each instance get their own version own copy of a mutable default of a class init. Under the hood this uses
Call self as a function.
Clone the default value for each instance.
Dataclass and Attrs support