| 243 | DataClass1 = make_dataclass("DataClass1", [("custom", CustomClass)]) |
| 244 | |
| 245 | class DataClass2(DataClass1): |
| 246 | @classmethod |
| 247 | def from_custom(cls, data): |
| 248 | custom = CustomClass(data) |
| 249 | return cls(custom) |
| 250 | |
| 251 | def __reduce__(self): |
| 252 | return (self.from_custom, (self.custom.value,)) |
| 253 | |
| 254 | CUSTOM_OBJECTS.append(DataClass2(custom=CustomClass(43))) |
| 255 |
no outgoing calls
searching dependent graphs…