class documentation

class FreezableDefaultDict(collections.defaultdict): (source)

View In Hierarchy

Often it is desirable to prevent the mutation of a default dict after its initial construction, such as to prevent mutation during iteration. >>> dd = FreezableDefaultDict(list) >>> dd[0].append('1') >>> dd.freeze() >>> dd[1] [] >>> len(dd) 1

Method __missing__ Undocumented
Method freeze Undocumented
Instance Variable _frozen Undocumented
def __missing__(self, key): (source)

Undocumented

def freeze(self): (source)

Undocumented

Undocumented