diff --git a/reg/predicate.py b/reg/predicate.py index ca8f418..f3a8b95 100644 --- a/reg/predicate.py +++ b/reg/predicate.py @@ -154,7 +154,7 @@ def __init__(self, *predicates): p, q, r = key_getters self.key = lambda **kw: (p(kw), q(kw), r(kw)) else: - self.key = lambda **kw: tuple([p(kw) for p in key_getters]) + self.key = lambda **kw: tuple(p(kw) for p in key_getters) def register(self, key, value): if key in self.known_keys: @@ -198,7 +198,7 @@ def key_dict_to_predicate_key(self, d): expected value is used. :returns: a tuple, to be used as a key for dispatching. """ - return tuple([p.key_by_predicate_name(d) for p in self.predicates]) + return tuple(p.key_by_predicate_name(d) for p in self.predicates) def component(self, keys): return next(self.all(keys), None)