from typing import Optional, List
from dataclasses import dataclass
import ctor
@dataclass
class Foo:
foo: str
@dataclass
class Bar:
bar: str
@dataclass
class ListsAggregate:
first: Optional[List[Foo]] = None
second: Optional[List[Bar]] = None
list_aggregate = ListsAggregate(
first=[Foo("value")],
second=[Bar("value")]
)
ctor.dump(list_aggregate)
raises RecursionError: maximum recursion depth exceeded while calling a Python object
raises
RecursionError: maximum recursion depth exceeded while calling a Python object