

def __init__(self, module=None, *conn_args, **conn_kargs):
    if (module is not None):
        self.getconn = (lambda : module.connect(*conn_args, **conn_kargs))
    else:
        self.getconn = None
    self.putconn = (lambda conn: conn.close())
    self.getcur = (lambda conn: conn.cursor())
    self.putcur = (lambda cur: cur.close())
    self.to_keep_conn = False
    self._conn = None
    self._cur_stack = deque()
    self._lock = Lock()

dataset/ETHPy150Open moskytw/mosql/mosql/db.py Database.__init__/original