[issue13433] String format documentation contains error regarding %g

2011-11-26 Thread Christian Iversen
Christian Iversen added the comment: Terry, the %g format always trims trailing zeroes, so you'd have to try with a number that doesn't end in zero. I had to make a re-implementation of format for javascript: http://paste.pocoo.org/show/513078/ If you look at the %g case, you c

[issue13433] String format documentation contains error regarding %g

2011-11-21 Thread Christian Iversen
Christian Iversen added the comment: Certainly, I don't think we should be peppering the docs with warnings and notes, either. However, the elements in question _already have_ notes. I propose that the note for %g (4) simply be updated for clarity. Something like this, perhaps: &quo

[issue13433] String format documentation contains error regarding %g

2011-11-19 Thread Christian Iversen
Christian Iversen added the comment: That was exactly the page I was looking at, and after some discussion on #python, I can see how they differ. Perhaps this could be clarified in the documentation? It's very easy to miss as it is now. Maybe a note describing that %g is different fro

[issue13433] String format documentation contains error regarding %g

2011-11-19 Thread Christian Iversen
New submission from Christian Iversen : The documentation for string format options state that both %f, %g and %e default to 6 digits after the decimal point. In fact, %g always seems to use 5 digits by default: >>> "%g" % 2.1234567 '2.12346' >>&g