def mod_abs_diff(a, b, base):
    """Shortest distance between `a` and `b` in the modular integers base `base`.
  
    The smallest distance between a and b is returned.
    Example: mod_abs_diff(1, 99, 100) ==> 2. It is not 98.
  
    mod_abs_diff is symmetric, i.e. `a` and `b` are interchangeable.
  
    Args:
      a: First argument. An int.
      b: Seconds argument. An int.
      base: The modulo base. A positive int.
  
    Returns:
      Shortest distance.
    """
    diff = abs(a - b)
    if diff >= base:
        diff %= base
    return min(diff, (-diff) + base)