@ignore :param str precision: The number of digits to the right of the decimal :returns str: a string number equal to 1e-precision
(self, precision: str)
| 6841 | return self.parse_number(value, defaultNumber) |
| 6842 | |
| 6843 | def parse_precision(self, precision: str): |
| 6844 | """ |
| 6845 | @ignore |
| 6846 | :param str precision: The number of digits to the right of the decimal |
| 6847 | :returns str: a string number equal to 1e-precision |
| 6848 | """ |
| 6849 | if precision is None: |
| 6850 | return None |
| 6851 | precisionNumber = int(precision) |
| 6852 | if precisionNumber == 0: |
| 6853 | return '1' |
| 6854 | if precisionNumber > 0: |
| 6855 | parsedPrecision = '0.' |
| 6856 | for i in range(0, precisionNumber - 1): |
| 6857 | parsedPrecision = parsedPrecision + '0' |
| 6858 | return parsedPrecision + '1' |
| 6859 | else: |
| 6860 | parsedPrecision = '1' |
| 6861 | for i in range(0, precisionNumber * -1 - 1): |
| 6862 | parsedPrecision = parsedPrecision + '0' |
| 6863 | return parsedPrecision + '0' |
| 6864 | |
| 6865 | def integer_precision_to_amount(self, precision: Str): |
| 6866 | """ |