Create a decimal instance directly, without any validation, normalization (e.g. removal of leading zeros) or argument conversion. This function is for *internal use only*.
(sign, coefficient, exponent, special=False)
| 3809 | return _format_number(adjusted_sign, intpart, fracpart, exp, spec) |
| 3810 | |
| 3811 | def _dec_from_triple(sign, coefficient, exponent, special=False): |
| 3812 | """Create a decimal instance directly, without any validation, |
| 3813 | normalization (e.g. removal of leading zeros) or argument |
| 3814 | conversion. |
| 3815 | |
| 3816 | This function is for *internal use only*. |
| 3817 | """ |
| 3818 | |
| 3819 | self = object.__new__(Decimal) |
| 3820 | self._sign = sign |
| 3821 | self._int = coefficient |
| 3822 | self._exp = exponent |
| 3823 | self._is_special = special |
| 3824 | |
| 3825 | return self |
| 3826 | |
| 3827 | # Register Decimal as a kind of Number (an abstract base class). |
| 3828 | # However, do not register it as Real (because Decimals are not |
no test coverage detected
searching dependent graphs…