title: Python std.stdout.write loop problems
body: <p>I'm not sure of what's going on here, but I have some python code:</p>
  
  <pre><code>import sys
  
  max_cols = 350
  max_rows = 1
  r1 = range(max_rows)
  r2 = range(max_cols)
  
  for y in r1:
      for x in r2:
          sys.stdout.write('something')
          if x is not max_cols-1:
              sys.stdout.write(',')
  </code></pre>
  
  <p>Now, this works fine for values of max_cols &lt;= 257.
  However, if you use >= 258, you end up with an extra ',' at the end.
  (The idea here is obviously to generate a CSV file.)</p>
  
  <p>Now, 256 is a CS number, so there's clearly something going on here that I'm unaware of, since everything works perfectly up until that point.  This also happens when I try to write to a file using the same pattern.</p>
  
  <p>Why does this happen?</p>
  
  <p>Using Python 3.2.</p>