From 01866cdfbcbe9dcb7e3eb71ab1bf88a9ad4b7dfd Mon Sep 17 00:00:00 2001 From: Florian Fischer Date: Fri, 21 Feb 2020 14:52:13 +0100 Subject: always use same namedtuple Class --- src/benchmark.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'src') diff --git a/src/benchmark.py b/src/benchmark.py index 23e28a7..479b2d6 100644 --- a/src/benchmark.py +++ b/src/benchmark.py @@ -248,10 +248,8 @@ class Benchmark: """Iterator over each possible combination of args""" if not args: args = self.args - arg_names = sorted(args.keys()) - for p in itertools.product(*[args[k] for k in arg_names]): - Perm = namedtuple("Perm", arg_names) - yield Perm(*p) + for p in itertools.product(*[args[k] for k in args.keys()]): + yield self.Perm(*p) def iterate_args_fixed(self, fixed, args=None): """Iterator over each possible combination of args containing all fixed values -- cgit v1.2.3