1 2 3 4 5 6 7 8 9 10 11 12 13
#!/usr/bin/env python3 from abc import ABC, abstractmethod from typing import Any class Predicate(ABC): def __init__(self): super().__init__() @abstractmethod def apply(self, item: Any) -> bool: pass