cx_Oracle cursor context
Use contextlib
’s closing
context manager:
from contextlib import closing
with closing(connection.cursor()) as cursor:
# Use cursor here. Will close when it leaves the block.
Use contextlib
’s closing
context manager:
from contextlib import closing
with closing(connection.cursor()) as cursor:
# Use cursor here. Will close when it leaves the block.