Open
Description
The Connection
class in the Python driver currently supports the Python with
structure, but our Cursor
class does not. I just ran into a case where it would be nice to have this. An example for clarity:
with r.db('foo').table('bar').run(conn) as full_table:
for row in full_table:
pass # do something in reality
While our Cursor
s are not that expensive, it does make sure that things get cleaned up on-time.