Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DataClass as return type of form #215

Open
aarmn opened this issue Mar 23, 2022 · 1 comment
Open

DataClass as return type of form #215

aarmn opened this issue Mar 23, 2022 · 1 comment
Labels
Enhancement New feature or request

Comments

@aarmn
Copy link

aarmn commented Mar 23, 2022

Describe the problem

Dictionaries are nice data types but they are not very well specialized for this purpose I feel, I wanna ask why there is not an option (or why it didn't become the default) to use data classes as the return type of questionary form?

Describe the solution

I guess it's pretty simple to implement it as a form option to return its data as a data class? if it matches zen of this project I guess I can work on it.

Alternatives considered

well, alternative is the already implemented approach so, Null :)

@aarmn aarmn added the Enhancement New feature or request label Mar 23, 2022
@tmbo
Copy link
Owner

tmbo commented Apr 3, 2022

Hey @aarmn that is a really good point - I guess reasons are pretty simple, it is based on inquirer and it used to be simple objects there (plus, dataclasses were not a thing when we started this 😉 ). We'd need to drop 3.6 support, but that is alright it is out of life now anyways.

I do like the idea, it could provide a cleaner interface. How about you create an example on how that would look like in terms of user experience for someone using questionary and then we decide based on that? I could see this justifying a breaking change.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants