diff --git a/kylinpy/kylindb.py b/kylinpy/kylindb.py index 8da4f8128..f3870ca2d 100644 --- a/kylinpy/kylindb.py +++ b/kylinpy/kylindb.py @@ -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') @@ -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)