File size: 213 Bytes
5eb110b
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
class Proto(Protocol):
    @abstractmethod
    def first(self) -> int:
        raise NotImplementedError
    def second(self) -> int:
        return self.first() + 1

def fun(arg: Proto) -> None:
    arg.second()