0

Having this dataclass wish to be reuse in 2 different scenario

class TestResponse:
    name: str
    parameters: Optional[list[ActionParameters]]

when call it with

TestResponse(
            name=name,
        )

without adding parameter attribute, will hit an error. how to make this attribute to be something like optional?

user1897151
  • 493
  • 2
  • 9
  • 28

0 Answers0