def pretty_print(x, numchars):
    """Given an object `x`, call `str(x)` and format the returned string so
    that it is numchars long, padding with trailing spaces or truncating with
    ellipses as necessary
    """
    s = str(x)
    if len(s) > numchars:
        return s[:(numchars - 3)] + '...'
    else:
        return s + ' ' * (len(s) - numchars)
dataset/ETHPy150Open pydata/xarray/xarray/core/formatting.py/pretty_print/swapped operands of `-`