示例#1
0
def equal_format(w1, w2):
    answer = False

    if tc.is_int(w1) and tc.is_int(w2):
        answer = True
    elif tc.is_float(w1) and tc.is_float(w2):
        answer = True
    elif tc.is_double(w1) and tc.is_double(w2):
        answer = True
    elif tc.is_date(w1) and tc.is_date(w2):
        answer = True

    return answer
示例#2
0
def get_type(x):
    if tc.is_int(x):
        return set(["int"])
    elif tc.is_float(x):
        return set(["float"])
    elif tc.is_double(x):
        return set(["double"])
    elif tc.is_date(x):
        return set(["date"])
    else:
        try:
            return e_type[x]
        except KeyError:
            return set(["str"])