Did I find the right examples for you? yes no

All Samples(2)  |  Call(0)  |  Derive(0)  |  Import(2)

        def fm_validator(omhe_value):
    valdict={}
    if omhe_value.endswith('l') or omhe_value.endswith('k'):
        valdict['fm_numeric']=omhe_value[:-1]
        valdict['fm_measure_unit']=omhe_value[-1]
    else:
        valdict['fm_numeric']=omhe_value
        valdict['fm_measure_unit']="l"
        
    try:
        f=float(valdict['fm_numeric'])
        if f < 1.0:
            error_msg="Fat mass may not be less than 1."
            raise InvalidValueError(error_msg)
        
    except ValueError:
        error_msg="I could not validate the value %s is not a numerical fat mass. " % (valdict['fm_numeric'])
        raise InvalidMessageError(error_msg)

    return valdict
        


src/p/y/python-omhe-0.6.1/omhe/core/parseomhe.py   python-omhe(Download)
from omhe.core.validators.wt_validator import wt_validator
from omhe.core.validators.ffm_validator import ffm_validator
from omhe.core.validators.fm_validator import fm_validator
from omhe.core.validators.pbf_validator import pbf_validator
from omhe.core.validators.ci_validator import ci_validator

src/p/y/python-omhe-HEAD/omhe/core/parseomhe.py   python-omhe(Download)
from omhe.core.validators.wt_validator import wt_validator
from omhe.core.validators.ffm_validator import ffm_validator
from omhe.core.validators.fm_validator import fm_validator
from omhe.core.validators.pbf_validator import pbf_validator
from omhe.core.validators.ci_validator import ci_validator