'Constructor: Rat([num[, den]]).
The arguments must be ints, and default to (0, 1).'

def __init__(self, num=0, den=1):

    if (not isint(num)):
        raise TypeError(('Rat    numerator    must    be    int    (%r)' % num))
    if (not isint(den)):
        raise TypeError(('Rat    denominator    must    be    int    (%r)' % den))
    if (den == 0):
        raise ZeroDivisionError('zero    denominator')
    g = gcd(den, num)
    self.__num = int((num // g))
    self.__den = int((den // g))
