I don't care about the placement of the decimal point, and would like to print in scientific notation when appropriate to display with maximum accuracy. However, I would like to round appropriately to maintain a fixed width, ragged left or ragged right is fine.
e.g.
>>> my_format("{:10f}", 0.0000000456)
" 4.56e-08"
>>> my_format("{:10f}", 12.345678987654321)
" 12.345679"
#or "12.34567890" because significant digits
#but not "1.2346e+01", since it is less accurate than the above representations
>>> my_format("{:10f}", 12345678987654321)
"1.2345e+16"
EDIT to clarify the examples, the width formatting specifier does not provide a fixed width. It provides a minimum width. How do I obtain a fixed width representation?