def parse_decimal(s):
    if '.' in s and ',' in s:
        raise Exception("Invalid decimal value %r" % s)
    s = s.replace(',', '.')
    return Decimal(s)
dataset/ETHPy150Open lsaffre/lino/lino/utils/quantities.py/parse_decimal/original