

def _check_not_creating_duplicates(new_name, names, type, exc):
    if (new_name in names):
        msg = 'Cannot add {} named "{}" which is already present in the schema.'
        raise exc(msg.format(type, new_name))

dataset/ETHPy150Open Alexis-benoist/eralchemy/eralchemy/parser.py _check_not_creating_duplicates/original