title: Have csv.reader tell when it is on the last line
body: <p>Apparently some csv output implementation somewhere truncates field separators from the right on the last row and only the last row in the file when the fields are null.</p>
  
  <p>Example input csv, fields 'c' and 'd' are nullable:</p>
  
  <pre><code>a|b|c|d
  1|2||
  1|2|3|4
  3|4||
  2|3
  </code></pre>
  
  <p>In something like the script below, how can I tell whether I am on the last line so I know how to handle it appropriately?</p>
  
  <pre><code>import csv
  
  reader = csv.reader(open('somefile.csv'), delimiter='|', quotechar=None)
  
  header = reader.next()
  
  for line_num, row in enumerate(reader):
      assert len(row) == len(header)
      ....
  </code></pre>