def equalityOperator(i1, i2) : type1 = type(i1) type2 = type(i2) if type1 == BooleanType or type2 == BooleanType : return operator(boolean(i1), boolean(i2)) if type1 == FloatType or type2 == FloatType : return operator(number(i1), number(i2)) return operator(string(i1), string(i2))
def equalityOperator(i1, i2): type1 = type(i1) type2 = type(i2) if type1 == BooleanType or type2 == BooleanType: return operator(boolean(i1), boolean(i2)) if type1 == FloatType or type2 == FloatType: return operator(number(i1), number(i2)) return operator(string(i1), string(i2))
def negative_(node, env) : return - number(expr(node, env))
def relationalOperator(i1, i2) : return operator(number(i1), number(i2))
def xpath_function_round(context, args, env): yield float(round(datamodel.number(args[0])))
def number(context, args, env): if len(args) > 0: yield datamodel.number(args[0]) else: yield datamodel.number(context[0])
def xpath_function_round(context, args, env) : yield float(round(datamodel.number(args[0])))
def number(context, args, env) : if len(args) > 0 : yield datamodel.number(args[0]) else : yield datamodel.number(context[0])
def negative_(node, env): return -number(expr(node, env))
def relationalOperator(i1, i2): return operator(number(i1), number(i2))