Skip to main content
`Ctrl`+`K`

# ng911ok.lib.iterablenamespace module

Provides container types for specific situations. `IterableNamespace` is similar to a `dict` with `str` keys whose elements may also be accessed as attributes. `FrozenDict` and `FrozenList` are intended for use as hashable alternatives to `dict` and `list`, respectively.

class FrozenDict(*args, **kwargs)

  Bases: `Mapping`[`KT`, `VT`], `Hashable`

  Immutable mapping class for use in cases that require a hashable dictionary. All keys and values must also be hashable.

  items() → a set-like object providing a view on D's items
  keys() → a set-like object providing a view on D's keys
  values() → an object providing a view on D's values
  __dict: dict[KT, VT]
  __hash: int
  _abc_impl = <_abc._abc_data object>

class FrozenList(iterable: Iterable[VT] | None = None)

  Bases: `Sequence`[`VT`], `Hashable`

  Immutable sequence class for use in cases that require a hashable list. All items must also be hashable.

  __data: tuple[VT, ...]
  __hash: int
  _abc_impl = <_abc._abc_data object>

class IterableNamespace

  Bases: `SimpleNamespace`, `Generic`[`T`], `MutableMapping`[`str`, `T`], `Sized`

  Mutable mapping that provides both `dict`-like and attribute-based element access.

  items() → a set-like object providing a view on D's items
  keys() → a set-like object providing a view on D's keys
  values() → an object providing a view on D's values
  _abc_impl = <_abc._abc_data object>