bridgepoint/ooaofooa.py
def mk_constant(cnst_syc):
    '''
    Create a python value from a BridgePoint constant.
    '''
    s_dt = one(cnst_syc).S_DT[1500]()
    cnst_lsc = one(cnst_syc).CNST_LFSC[1502].CNST_LSC[1503]()
    
    if s_dt.Name == 'boolean':
        return cnst_lsc.Value.lower() == 'true'
    
    if s_dt.Name == 'integer':
        return int(cnst_lsc.Value)
    
    if s_dt.Name == 'real':
        return float(cnst_lsc.Value)
    
    if s_dt.Name == 'string':
        return str(cnst_lsc.Value)
def mk_constant(cnst_syc):
    '''
    Create a python value from a BridgePoint constant.
    '''
    s_dt = one(cnst_syc).S_DT[1500]()
    cnst_lsc = one(cnst_syc).CNST_LFSC[1502].CNST_LSC[1503]()
    
    if s_dt.Name == 'boolean':
        return cnst_lsc.Value.lower() == 'true'
    
    if s_dt.Name == 'integer':
        return int(cnst_lsc.Value)
    
    if s_dt.Name == 'real':
        return float(cnst_lsc.Value)
    
    if s_dt.Name == 'string':
        return str(cnst_lsc.Value)
Create a python value from a BridgePoint constant.