From 203d4577b7add326200ac66a3aac674dd7134562 Mon Sep 17 00:00:00 2001 From: Tim Cera Date: Thu, 6 Dec 2018 08:06:03 -0500 Subject: [PATCH] BUG: Fixed bug with Python 2.7 in make_list. --- tstoolbox/tsutils.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/tstoolbox/tsutils.py b/tstoolbox/tsutils.py index ce8bc88..a418d6f 100644 --- a/tstoolbox/tsutils.py +++ b/tstoolbox/tsutils.py @@ -500,9 +500,14 @@ def _pick_column_or_value(tsd, var, unit): return var -def make_list(*strorlist, n=0): +def make_list(*strorlist, **kwds): """Normalize strings, converting to numbers or lists. """ + try: + n = kwds.pop('n') + except KeyError: + n = 0 + if isinstance(strorlist, (list, tuple)) and len(strorlist) == 1: strorlist = strorlist[0]