Did I find the right examples for you? yes no

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

        def ffm_validator(omhe_value):
    valdict={}
    
    if omhe_value.isdigit():
        valdict['ffm_numeric']=omhe_value
        valdict['ffm_measure_unit']="l"
        try:
            x=float(valdict['ffm_numeric'])
            return valdict
        except:
            raise InvalidValueError(" You didn't supply a numerical free fat mass. ")
            
    if omhe_value.endswith('l'):
        valdict['ffm_numeric']=omhe_value[:-1]
        valdict['ffm_measure_unit']="l"
        try:
            x=float(valdict['ffm_numeric'])
            return valdict
        except:
            raise InvalidValueError(" You didn't supply a numerical free fat mass. ")
        
    
    if omhe_value.endswith('k'):
        valdict['ffm_numeric']=omhe_value[:-1]
        valdict['ffm_measure_unit']="k"
        try:
            x=float(valdict['ffm_numeric'])
            return valdict 
        except:
            raise InvalidValueError(" You didn't supply a numerical free fat mass. ")
    
    error_msg="I could not validate the value %s" % (omhe_value)
    raise InvalidMessageError(error_msg)
        


src/p/y/python-omhe-0.6.1/omhe/core/parseomhe.py   python-omhe(Download)
from omhe.core.validators.st_validator import st_validator
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

src/p/y/python-omhe-HEAD/omhe/core/parseomhe.py   python-omhe(Download)
from omhe.core.validators.st_validator import st_validator
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