(cls, vals, ops, getvalues=True)
return expr
Create an expression string from provided operands and operators
Create an expression string from provided operands and operators
Create an expression string from provided operands and operators
def doExpression(cls, vals, ops, getvalues=True):
        """Create an expression string from provided operands and operators"""
        expr = ''
        if getvalues == True:
            for i in range(len(vals)):
                if vals[i] != '':
                    vals[i] = float(vals[i])
        if len(ops)>len(vals):
            while len(ops):
                #use lists as queues
                expr += ops.pop(0)
                if len(vals)!=0:
                    v=vals.pop(0)
                    if v == '':
                        pass
                    else:
                        expr += str(v)
        elif len(ops)<len(vals):
            while len(vals):
                #use lists as queues
                v=vals.pop(0)
                if v == '':
                    pass
                else:
                    expr += str(v)
                if len(ops)!=0:
                    expr += ops.pop(0)
        return expr
def doExpression ( cls , vals , ops , getvalues = True ) : expr = '' if getvalues == True : for i in range ( len ( vals ) ) : if vals [ i ] != '' : vals [ i ] = float ( vals [ i ] ) if len ( ops ) > len ( vals ) : while len ( ops ) : #use lists as queues expr += ops . pop ( 0 ) if len ( vals ) != 0 : v = vals . pop ( 0 ) if v == '' : pass else : expr += str ( v ) elif len ( ops ) < len ( vals ) : while len ( vals ) : #use lists as queues v = vals . pop ( 0 ) if v == '' : pass else : expr += str ( v ) if len ( ops ) != 0 : expr += ops . pop ( 0 ) return expr