class Wrap2(object):

    def __init__(self, O):
        self.O = O
self.cache = {}

def __getitem__(self, x):
    r = self.cache.get(x)
if r is None:
    r = self.cache[x] = dict((k, vs[x]) for k, vs in self.O.items())
return r
Split dictionary of lists into list of dictionaries