title: Which cursor object is pyodbc's `Cursor.execute` returning?
body: <p>According to <a href="https://www.python.org/dev/peps/pep-0249/#cursor-methods" rel="nofollow">PEP249</a>, <code>Cursor.execute</code> has no defined return values.  <code>pyodbc</code>, however, seems to make it return a cursor object; the docs say so, too, albeit rather briefly:</p>
  
  <blockquote>
    <p><strong>execute</strong>(...)<br>
          C.execute(sql, [params]) --> Cursor</p>
  </blockquote>
  
  <p>Is this guaranteed/documented somewhere in more detail? </p>
  
  <p>Looking at identities, the object returned appears to be the very same cursor, perhaps for chaining calls?</p>
  
  <pre><code>&gt;&gt;&gt; thing_called_cursor = conn.cursor()
  &gt;&gt;&gt; result = thing_called_cursor.execute("SELECT * FROM Item")
  &gt;&gt;&gt; result
  &lt;pyodbc.Cursor object at 0x10b3290f0&gt;
  &gt;&gt;&gt; thing_called_cursor
  &lt;pyodbc.Cursor object at 0x10b3290f0&gt;
  </code></pre>
  
  <p>Also,</p>
  
  <pre><code>&gt;&gt;&gt; id(result)
  4482830576
  &gt;&gt;&gt; id(thing_called_cursor)
  4482830576
  </code></pre>
  
  <p>I could try looking into the sources, but I'd rather not depend on anything I find there. Perhaps it is best to ignore whatever is currently being returned by <code>Cursor.execute</code> as doing so best meets the specification in the PEP?</p>