FrozenDict

class of dascore.utils.mapping
inherits from: collections.abc.Mapping, collections.abc.Collection, collections.abc.Sized, collections.abc.Iterable, collections.abc.Container
source

FrozenDict(
    *args ,
    **kwargs ,
)

An immutable wrapper around dictionaries that implements the complete :py:class:collections.Mapping interface. It can be used as a drop-in replacement for dictionaries where immutability is desired.

Note

This implementation was Inspired by the no-longer maintained package frozen-dict (https://github.com/slezica/python-frozendict)

By design, changes in the original dict are not reflected in the frozen dict so that the hash doesn’t break.

Methods

Name Description
copy Perform a shallow copy on the dictionaries contents.