title: .format() returns ValueError when using {0:g} to remove trailing zeros
body: <p>I'm trying to generate a string that involves an occasional float with trailing zeros. This is a MWE of the text string and my attempt at removing them with <code>{0:g}</code>:</p>
  
  <pre><code>xn, cod = 'r', 'abc'
  ccl = [546.3500, 6785.35416]
  ect = [12.350, 13.643241]
  
  text = '${}_{{t}} = {0:g} \pm {0:g}\;{}$'.format(xn, ccl[0], ect[0], cod)
  print text
  </code></pre>
  
  <p>Unfortunately this returns:</p>
  
  <pre><code>ValueError: cannot switch from automatic field numbering to manual field specification
  </code></pre>
  
  <p>This question <a href="https://stackoverflow.com/questions/10875121/using-format-to-format-a-list-with-field-width-arguments">Using .format() to format a list with field width arguments</a> reported on the same issue but I can't figure out how to apply the answer given there to this problem.</p>