title: Python thinks that psycopg2 DictRow is list (At least that's what it looks like)
body: <p>I have some code that originally looked like this (it's part of a for loop that iterates through the results of a query):</p>
  
  <pre><code>title['name'] += 'x'
  </code></pre>
  
  <p>I sometimes get the following exception (always on the same row):</p>
  
  <pre><code>&lt;class 'psycopg2.extras.DictRow'&gt;
  Traceback (most recent call last):
    File "rtk_film_nos.py", line 231, in &lt;module&gt;
      main()
    File "rtk_film_nos.py", line 150, in main
      title['name'] += 'x'
  TypeError: list indices must be integers, not str
  </code></pre>
  
  <p>I changed the code to be more verbose:</p>
  
  <pre><code>foo = title['name']
  foo += 'x'
  print type(title)
  title['name'] = foo
  </code></pre>
  
  <p>The exception changed to:</p>
  
  <pre><code>&lt;class 'psycopg2.extras.DictRow'&gt;
  Traceback (most recent call last):
    File "rtk_film_nos.py", line 231, in &lt;module&gt;
      main()
    File "rtk_film_nos.py", line 150, in main
      title['name'] = foo
  TypeError: list indices must be integers, not str
  </code></pre>
  
  <p>If I wrap the code in a try/except it will quite happily print the contents of title['name'].</p>
  
  <p>I'm at a loss as to what I'm doing wrong. It seems that for some reason python (v2.6.6) is deciding to treat the dict as a list but I have no idea why.</p>