From c7264056016150615b7a7e3ebde7c202661b93d2 Mon Sep 17 00:00:00 2001 From: Emmanuel Garette Date: Mon, 16 Apr 2018 11:33:52 +0200 Subject: [PATCH] Params is a list or tuple --- tiramisu/function.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/tiramisu/function.py b/tiramisu/function.py index b531d1d..7a3348e 100644 --- a/tiramisu/function.py +++ b/tiramisu/function.py @@ -25,7 +25,7 @@ class Params: if isinstance(args, Param): args = (args,) else: - if not isinstance(args, list): + if not isinstance(args, (tuple, list)): raise ValueError(_('args in params must be a list')) for arg in args: if not isinstance(arg, Param): @@ -35,6 +35,8 @@ class Params: for arg in kwargs.values(): if not isinstance(arg, Param): raise ValueError(_('arg in params must be a Param')) + if isinstance(args, list): + args = tuple(args) self.args = args self.kwargs = kwargs