Allow usage of functools.partial() as predicate