-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
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
unpack dataclasses/types or subsets of them to act as typed dict #12906
Comments
There's already a PR to make this happen: #8583 |
@AlexWaygood i strongly disagree my understanding is that the pr makes mypy pretends that the return value of the as_dict methods is a matching typed dict |
I see, apologies. Your proposed new way of constructing a |
I'm closing, because I don't think this is the appropriate forum for this kind of feature request, but please feel free to open a new issue at https://github.com/python/typing or to start a discussion on the typing-sig mailing list. |
@RonnyPfannschmidt I propose as a next step, writing this out on the typing-sig list and seeing what the reception is I think the conversation it'd generate (whether there's overlap with someone else or a PEP) would be fruitful. Would you like to write a message there? |
Unfortunately my bandwidth for this is currently zero, and likely to stay like that for the next few months |
@RonnyPfannschmidt No problem. Is it okay if in the future if someone stumbles upon this they can cite this as an idea on the typing-sig list if they want to? |
Yes |
Feature
often times helper methods take all the fields or subsets of the fields of a type/dataclass
in coordination with #4441
and i want to declare helpers like
** context **
spin out of #4441, based on my comment and the suggestion in
The text was updated successfully, but these errors were encountered: