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

Add subcast for key in dict #151

Closed
AugPro opened this issue Mar 30, 2020 · 1 comment
Closed

Add subcast for key in dict #151

AugPro opened this issue Mar 30, 2020 · 1 comment

Comments

@AugPro
Copy link
Contributor

AugPro commented Mar 30, 2020

Hello, I haven't found a clear explanation in the doc but from what I understand from the source code in _preprocess_dict, subcast parameter only impacts the value of the duct, not the key. It would be nice to have two different parameters for subcasting. Like subcast_key and subcast_value.

Happy to submit PR If you think this is a good improvement!

@sloria
Copy link
Owner

sloria commented Apr 9, 2020

Seems reasonable, especially since marshmallow already supports fields.Dict(key_field, value_field). Would be happy to review and merge a PR.

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

No branches or pull requests

2 participants