def isnum(x):
    for T in int, long, float, complex:
        if isinstance(x, T):
            return 1
    return 0
Test whether an object is an instance of a built-in numeric type.
dataset/ETHPy150Open azoft-dev-team/imagrium/env/Lib/test/test_binop.py/isnum