msl.io.dictionary module

An OrderedDict that can be made read only.

class msl.io.dictionary.Dictionary(read_only, **kwargs)[source]

Bases: MutableMapping

A dict that can be made read only.

Parameters:
  • read_only (bool) – Whether the underlying dict should be created in read-only mode.

  • **kwargs – Key-value pairs that are used to create the underlying dict object.

clear()[source]

Remove all items from the dictionary.

items()[source]

Return a new view of the dictionary’s items, i.e., (key, value) pairs.

keys()[source]

Return a new view of the dictionary’s keys.

property read_only

Whether the underlying dict is in read-only mode.

Type:

bool

values()[source]

Return a new view of the dictionary’s values.