title: Thousand separator in format string with floats
body: <p>I want to have thousand separators in floats. What I'm doing is:</p>
  
  <pre><code>&gt;&gt;&gt; import locale
  &gt;&gt;&gt; locale.setlocale(locale.LC_ALL, 'en_US.UTF-8')
  'en_US.UTF-8'
  &gt;&gt;&gt; print '{0:n}'.format(123456.0)
  123,456
  </code></pre>
  
  <p>When the integer part has 7 or more digits it does not work:</p>
  
  <pre><code>&gt;&gt;&gt; print '{0:n}'.format(1234567.0)
  1.23457e+06
  </code></pre>
  
  <p>The workaround that I found is to turn the float into an integer before formating:</p>
  
  <pre><code>&gt;&gt;&gt; print '{0:n}'.format(int(1234567.0))
  1,234,567
  </code></pre>
  
  <p>Is there a format string that would handle all floats without the need to turn it into an integer first?</p>