'Return a random integer N such that a <= N <= b.'

def randint(self, a, b):

    if ((not isinstance(a, (int, long))) or (not isinstance(b, (int, long)))):
        raise TypeError('randint    requires    integer    arguments')
    N = self.randrange(a, (b + 1))
    assert (a <= N <= b)
    return N
