def __init__(self, size, precision, sign="-", point=".", exp="E",
                 nan_str="NaN", inf_str="Inf"):
        """
        @param size
          The number of digits for the exponent.
        @param precision
          The number of digits for the fractional part, or `None` to suppress
          the decimal point.
        @param sign
          "-" for negative sign only, "+" for both, `None` for none.
        @param point
          The decimal point character.
        @param exp
          The character that introduces the exponent.
        @param nan_str
          The string to use for NaN; if too long, it is truncated.
        @param inf_str
          The string to use for infinity; if too long, it is truncated.
        """
        assert size > 0
        assert precision is None or precision >= 0
        assert sign in (None, "-", "+")

        width = (
            1 + (0 if precision is None else len(point) + precision)
            + len(exp) + 1 + size)
        nan_str = nan_str[: width]
        inf_str = inf_str[: width]
        if sign in ("-", "+"):
            width += 1

        self.__size         = size
        self.__precision    = precision
        self.__sign         = sign
        self.__point        = point
        self.__exp          = exp
        self.__nan_str      = nan_str
        self.__inf_str      = inf_str

        self.__multiplier   = None if precision is None else 10 ** precision
        self.__width        = width
dataset/ETHPy150Open twosigma/ngrid/ngrid/formatters.py/EFloatFormatter.__init__/original