Skip to content

AttributeDict typing and constructor updates #3105

Closed
@pacrob

Description

@pacrob

AttributeDict and it's parent classes use Mapping[TKey, TValue] for typing, but in practice they often have multiple types in a single structure, at least in the values (strings, ints, hexbytes, etc.)

Consider changing the type, either by being more specific, or opening it to Any, as a user could theoretically turn any mapping into an AttributeDict.

Also, since an AttributeDict is expected to be a hashable datastructure, consider doing recursive tupleization/checking for unhashable types at the time of creation, instead of only when trying to hash it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions