-
-
Notifications
You must be signed in to change notification settings - Fork 367
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
asdict(): Optionally retain collection types #69
Labels
Comments
How about we just use the
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
When calling
attr.asdict()
, it converts attributes of typetuple
,set
to typelist
and subclasses ofdict
todict
. This is being done for JSON compatibility, however, there are use cases where it's required to preserve the original type.Therefore I request an optional argument called
retain_collection_types
, which is set toFalse
by default (to not break the existing API). If enabled, the function should not convert any collection type.The text was updated successfully, but these errors were encountered: