decimal.Decimal.to_eng_string()

to_eng_string(context=None)

Convert to a string, using engineering notation if an exponent is needed.

Engineering notation has an exponent which is a multiple of 3. This can leave up to 3 digits to the left of the decimal place and may require the addition of either one or two trailing zeros.

For example, this converts Decimal('123E+1') to Decimal('1.23E+3').

doc_python
2016-10-07 17:31:39
Comments
Leave a Comment

Please login to continue.