

def from_map(self, inmap):
    'Initialize the dictionary of languages by examining the input map\n\n        :param inmap: the input YAML map defining the languages\n        '
    for key in inmap:
        (objtype, spc, lng) = key.partition(' ')
        if ((spc != ' ') or (objtype != 'language')):
            raise KeyError(('Unrecognized object type: %s' % key))
        language = self[lng] = Language(name=lng)
        inlanguage = inmap[key]
        if inlanguage:
            for (attr, val) in list(inlanguage.items()):
                setattr(language, attr, val)
            if ('oldname' in inlanguage):
                del inlanguage['oldname']

dataset/ETHPy150Open perseas/Pyrseas/pyrseas/dbobject/language.py LanguageDict.from_map/original