[Python-Dev] format specification mini-language docs...
dinov at microsoft.com
Sat Nov 22 01:51:50 CET 2008
Ok, now I'm implementing __format__ support for IronPython. The format spec mini-language docs say that a presentation type of None is the same as 'g' for floating point / decimal values. But these two formats seem to differ based upon how they handle whole numbers:
The docs also say that 'g' prints it as fixed point unless the number is too large. But the fixed point format differs from what 'f' would print. I guess it didn't say they'd both print it as fixed point w/ a precision of 6 or anything but it seems a little unclear.
Finally providing any sign character seems to cause +1.0#INF and friends to be returned instead of inf as is documented:
Are these just doc bugs? The inf issue is the only one that seems particularly weird to me.
More information about the Python-Dev