Skip to content

Commit

Permalink
change default argument value
Browse files Browse the repository at this point in the history
  • Loading branch information
yqkcn authored and shaofengshi committed Mar 13, 2023
1 parent 4964878 commit 813b427
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions kylinpy/kylindb.py
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,9 @@ def description(self):
c['isNullable'],
] for c in self._column_metas)

def execute(self, query, parameters={}):
def execute(self, query, parameters=None):
if parameters is None:
parameters = {}
resp = self.connection.query(query, **parameters)

self._column_metas = resp.get('columnMetas')
Expand All @@ -48,7 +50,9 @@ def execute(self, query, parameters={}):
self.rowcount = len(self.results)
self.fetched_rows = 0

def executemany(self, query, seq_params=[]):
def executemany(self, query, seq_params=None):
if seq_params is None:
seq_params = []
results = []
for param in seq_params:
self.execute(query, param)
Expand Down

0 comments on commit 813b427

Please sign in to comment.