sciris.sc_odict

The ‘odict’ class, combining features from an OrderedDict and a list/array.

Highlights:
  • odict: flexible container representing the best-of-all-worlds across lists, dicts, and arrays

  • objdict: like an odict, but allows get/set via e.g. foo.bar instead of foo['bar']

Functions

asobj

Convert any object for which you would normally do a['b'] to one where you can do a.b.

Classes

dictobj

Lightweight class to create an object that can also act like a dictionary.

objdict

An odict that acts like an object -- allow keys to be set/retrieved by object notation.

odict

Combine the init properties of both OrderedDict and defaultdict