MCPcopy Create free account
hub / github.com/apache/fory / DataClassObject

Class DataClassObject

python/pyfory/tests/test_struct.py:631–652  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

629
630@dataclass
631class DataClassObject:
632 f_int: int
633 f_float: float
634 f_str: str
635 f_bool: bool
636 f_list: List[int]
637 f_dict: Dict[str, float]
638 f_any: Optional[Any]
639 f_complex: Optional[ComplexObject] = None
640
641 @classmethod
642 def create(cls):
643 return cls(
644 f_int=42,
645 f_float=3.14159,
646 f_str="test_codegen",
647 f_bool=True,
648 f_list=[1, 2, 3],
649 f_dict={"key": 1.5},
650 f_any="any_data",
651 f_complex=None,
652 )
653
654
655@dataclass

Calls

no outgoing calls