sc_odict#

The “odict” class, combining features from an OrderedDict and a list/array.

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

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

Classes

ddict

alias of defaultdict

odict

Ordered dictionary with integer indexing

objdict

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

dictobj

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

Functions

asobj

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