Re: [sqlalchemy] Automatic close of ResultProxy (using "with" statement)

2013-10-13 Thread Michael Bayer
On Oct 13, 2013, at 7:45 AM, Martin Stettner wrote: > I'm using SqlAlchemy core to access my database. I'm just wondering if > there's a specific reason why the ResultProxy class doesn't implement the > __enter__ and __exit__ methods for automatically closing the results of a > query using Py

[sqlalchemy] Automatic close of ResultProxy (using "with" statement)

2013-10-13 Thread Martin Stettner
I'm using SqlAlchemy core to access my database. I'm just wondering if there's a specific reason why the ResultProxy class doesn't implement the __enter__ and __exit__ methods for automatically closing the results of a query using Python's with statement. This would make the following code poss