(self, digitstr, exp10, type_sign, force_dot, group_digits=False)
return valstr
Put digits in decimal notation.
Put digits in decimal notation.
Put digits in decimal notation .
def _decimal_notation(self, digitstr, exp10, type_sign, force_dot, group_digits=False):
        """Put digits in decimal notation."""
        type_sign = b'' if not type_sign else self.sigil
        # digits to decimal point
        exp10 += 1
        if exp10 >= len(digitstr):
            valstr = digitstr + b'0'*(exp10-len(digitstr))
            if group_digits:
                valstr = self._group_digits(valstr)
            if force_dot:
                valstr += b'.'
        elif exp10 > 0:
            valstr = digitstr[:exp10]
            if group_digits:
                valstr = self._group_digits(valstr)
            valstr += b'.' + digitstr[exp10:]
        else:
            valstr = b'.' + b'0'*(-exp10) + digitstr
        if (b'.' not in valstr) or (type_sign == b'#'):
            valstr += type_sign
        return valstr
def _decimal_notation ( self , digitstr , exp10 , type_sign , force_dot , group_digits = False ) : type_sign = b'' if not type_sign else self . sigil # digits to decimal point exp10 += 1 if exp10 >= len ( digitstr ) : valstr = digitstr + b'0' * ( exp10 - len ( digitstr ) ) if group_digits : valstr = self . _group_digits ( valstr ) if force_dot : valstr += b'.' elif exp10 > 0 : valstr = digitstr [ : exp10 ] if group_digits : valstr = self . _group_digits ( valstr ) valstr += b'.' + digitstr [ exp10 : ] else : valstr = b'.' + b'0' * ( - exp10 ) + digitstr if ( b'.' not in valstr ) or ( type_sign == b'#' ) : valstr += type_sign return valstr