Bobspadger / pyodbc

Automatically exported from code.google.com/p/pyodbc
MIT No Attribution
0 stars 0 forks source link

Add context manager support for pyodbc.Cursor #158

Open GoogleCodeExporter opened 9 years ago

GoogleCodeExporter commented 9 years ago
It's quite nice that context manager support was added for pyodbc.Connection; 
now I'd like it for Cursor as well.

Since Cursor, like Connection, is a closeable thing, I would expect that if 
Connection has context manager support, then so would Cursor.  

As I understand it, not all implementations of Python use reference counting, 
and so some people claim that the better practice is to write code that does 
not assume it.  

Original issue reported on code.google.com by char...@declareSub.com on 22 Feb 2011 at 9:02