Q:

String Formatting: what is the width for the e format?

My IronPython console gives the following:
 >>> "%9.2e" % 1.236
 '1.24e+00'
 >>> "%10.2e" % 1.236
 ' 1.24e+00'
 >>>

The total characters in the output do not seem to correspond to 9 or 10 respectively.

A:

This is a know bug with IronPython; the width is not handled correctly when using the %<width>e format.
CPython handles the width as expected; e.g. '%9.2e' % 1.236 produces a string of length 9. You could try using the format() function instead, if you are lucky it doesn't reuse the same code:
format(1.236, '9.2e')

