Skip to content

Support passing the dict class to asdict #40

@Tinche

Description

@Tinche

A feature idea: attr.asdict currently turns classed into ordinary Python dicts. It'd be useful if a dict factory could be passed in (defauting to just dict). The main use case would be to pass in OrderedDict.

I have a situation at work that this would be useful for, but we're approaching the problem from a different angle so we probably won't need it. Just thought it might be a useful feature and simple to implement. I could put together a pull request.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions