def _convert_params(sql, params):
 args = [sql]
 if (params is not None):
  if hasattr(params, 'keys'):
   args += [params]
  else:
   args += [list(params)]
 return args

def _convert_params ( sql , params ) : args = [ sql ] if ( params is not None ) : if hasattr ( params , 'keys' ) : args += [ params ] else : args += [ list ( params ) ] return args
convert sql and params args to dbapi2 .