Skip to content

Handling multiple return type #255

Answered by EvaSDK
EvaSDK asked this question in Q&A
Feb 2, 2022 · 2 comments · 7 replies
Discussion options

You must be logged in to vote

One thing I thought was to merge the two classes in one but what bothers me is that the fields are disjoint so I would have to make everything optional. Maybe https://pydantic-docs.helpmanual.io/usage/models/#generic-models is what I'm looking for.

Replies: 2 comments 7 replies

Comment options

You must be logged in to vote
4 replies
@EvaSDK
Comment options

@prkumar
Comment options

@EvaSDK
Comment options

@EvaSDK
Comment options

Answer selected by EvaSDK
Comment options

You must be logged in to vote
3 replies
@EvaSDK
Comment options

@EvaSDK
Comment options

@EvaSDK
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants