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

Feature request: Option for keyword-only constructor in make_init and friends #85

Open
burnpanck opened this issue Jan 14, 2022 · 3 comments

Comments

@burnpanck
Copy link

Usually, I prefer dataclass-like objects to have keyword-only __init__. In general, I believe that invocations with more than one or two positional arguments are a risk to refactoring and make the code harder to read. and dataclasses with just one or two fields seem to defeat the purpose.

@smarie
Copy link
Owner

smarie commented Jan 14, 2022

This is a nice suggestion @burnpanck ! It could even be made the default, as it makes sense.

Would you like to give a shot at a PR ? Otherwise I'll have a look when time allows

@burnpanck
Copy link
Author

I am really just starting to use pyfields, so at this point I haven't felt the calling for a PR yet. That might change once I've used pyfields more seriously though.

@smarie
Copy link
Owner

smarie commented Feb 11, 2022

Ok, thanks for the feedback ! Let me know.

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

No branches or pull requests

2 participants