(var)
return False
Tests whether var is a Rational.

    This accounts for: long, int, float, Fraction, mpz, mpq (if available).
Tests whether var is a Rational.
Tests whether var is a Rational .
def is_python_rational(var):
    """Tests whether var is a Rational.

    This accounts for: long, int, float, Fraction, mpz, mpq (if available).
    """
    if type(var) == mpz_type or type(var) == mpq_type:
        return True
    if type(var) == pyFraction:
        return True
    if type(var) == int:
        return True
    if type(var) == float:
        return True
    return False
def is_python_rational ( var ) : if type ( var ) == mpz_type or type ( var ) == mpq_type : return True if type ( var ) == pyFraction : return True if type ( var ) == int : return True if type ( var ) == float : return True return False