New format() strings


Recommended Posts

I like the idea of %u, where it will automagically roll between floating point and exponential notation, but you can't specify the number of decimal places like you can with %f, so I'd like to be able to do that.

I'd also like to have a format string for "engineering notation", which is exponential, but with the exponents are limited to multiples of three, and the mantissa can range from one to three places before the decimal.  Thus, the exponential part is always thousands, millions, billions, etc.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

 Share