def parse_files(self): for file_name, f in self.files.iteritems(): file_map = file_to_pyobject(f) self.map[file_name] = [ MarkingMenu(**menu) for menu in file_map # for name, item in menu.iteritems() ]
def parse_files(self): for file_name, f in self.files.iteritems(): file_map = file_to_pyobject(f) self.map.setdefault(file_name, {}) for d in file_map: for name, kw in d.iteritems(): self.map[file_name][name] = Layout(name, file_name, **kw)