soapypower/__main__.py
def float_with_multiplier(string):
    """Convert string with optional k, M, G, T multiplier to float"""
    match = re_float_with_multiplier.search(string)
    if not match or not match.group('num'):
        raise ValueError('String "{}" is not numeric!'.format(string))

    num = float(match.group('num'))
    multi = match.group('multi')
    if multi:
        try:
            num *= multipliers[multi]
        except KeyError:
            raise ValueError('Unknown multiplier: {}'.format(multi))
    return num
def float_with_multiplier(string):
    match = re_float_with_multiplier.search(string)
    if not match or not match.group('num'):
        raise ValueError('String "{}" is not numeric!'.format(string))

    num = float(match.group('num'))
    multi = match.group('multi')
    if multi:
        try:
            num *= multipliers[multi]
        except KeyError:
            raise ValueError('Unknown multiplier: {}'.format(multi))
    return num
def float_with_multiplier ( string ) : match = re_float_with_multiplier . search ( string ) if not match or not match . group ( 'num' ) : raise ValueError ( 'String "{}" is not numeric!' . format ( string ) ) num = float ( match . group ( 'num' ) ) multi = match . group ( 'multi' ) if multi : try : num *= multipliers [ multi ] except KeyError : raise ValueError ( 'Unknown multiplier: {}' . format ( multi ) ) return num
Convert string with optional k, M, G, T multiplier to float
Convert string with optional k M G T multiplier to float