Expand description
repr of a float, which is not what any Rust format specifier produces.
Rust prints 1e30 as thirty digits and 1.0 as 1. CPython picks between
fixed and exponential notation on the position of the decimal point, pads
the exponent to two digits, and always signs it. The digits themselves are
the same in both languages, the shortest string that reads back as the same
double, so {:e} supplies them and only the presentation is redone here.
Enums§
- DotZero
- Whether a float with no fractional part keeps a trailing
.0.
Functions§
- float_
repr reprof a float, withdot_zerodeciding the trailing.0.