def __init__(self, loader, *a, **kw):
        """Load, and map raw data onto the defined fields of this dict-like structure"""
        if isinstance(loader, Loader):
            self._loader = loader
        elif issubclass(loader, Loader):
            self._loader = loader(*a, **kw)
        else:
            loader_class = Loader.__class__.__name__
            m = "Expected a subclass or instance of '%s' got: '%s' instead"
            raise ValueError(m % (loader_class, repr(loader)))

        super(LoadedDataStruct, self).__init__(self.read_from_loader())
def __init__ ( self , loader , * a , ** kw ) : if isinstance ( loader , Loader ) : self . _loader = loader elif issubclass ( loader , Loader ) : self . _loader = loader ( * a , ** kw ) else : loader_class = Loader . __class__ . __name__ m = "Expected a subclass or instance of '%s' got: '%s' instead" raise ValueError ( m % ( loader_class , repr ( loader ) ) ) super ( LoadedDataStruct , self ) . __init__ ( self . read_from_loader ( ) )
Load, and map raw data onto the defined fields of this dict-like structure