You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Implement context manager for Cursor object to enable with statement.
Currently the with statement can't be used for cursors because they don't implement a context manager, i.e. the __enter__ and __exit__ attributes meaning that the following code will fail:
Implement context manager for Cursor object to enable
with
statement.Currently the
with
statement can't be used for cursors because they don't implement a context manager, i.e. the__enter__
and__exit__
attributes meaning that the following code will fail:It would make sense to enable cursor object to be used in
with
statements that take care of closing the cursors automatically.The text was updated successfully, but these errors were encountered: