title: Looping through a result proxy object
body: <p>Got a nested loop with the inside loop being an sqlalchemy result proxy object. The problem I have is that when the second iteration of the outer loop is instantiated and goes back to iterating the resultproxy object, the script exists with the error </p>
  
  <pre><code>sqlalchemy.exc.ResourceClosedError: This result object is closed.
  </code></pre>
  
  <p>Here is my code. The inside loop fails when X is > 0:</p>
  
  <pre><code>tbl = Table('users', self.meta, autoload=True, autoload_with=Engine)
  stmt = select([tbl.c.id, tbl.c.name])
  result = self.CONN.execute(stmt)
  for x in range(2):
      for row in result:
          print(row[tbl.c.id])
  </code></pre>