All builtin types have a __repr__ implementation that can be fed to eval to obtain the original Python value. This is on purpose. frozendict and OrderedFrozendict simply being an immutable version of builtin types should also support this behavior. One simply need to slightly modify the __repr__ implementation.
All builtin types have a
__repr__
implementation that can be fed toeval
to obtain the original Python value. This is on purpose.frozendict
andOrderedFrozendict
simply being an immutable version of builtin types should also support this behavior. One simply need to slightly modify the__repr__
implementation.This parallels
frozenset
's__repr__
.