Files
camera-extrinsic-play/protocol.py
2025-07-11 15:11:09 +08:00

17 lines
275 B
Python

from typing import Protocol, TypeVar, Generic
T = TypeVar("T")
class Adder(Generic[T], Protocol):
def add(self, a: T, b: T) -> T: ...
class AdderImpl(Adder[int]):
acc: int
def add(self, a: int, b: int):
self.acc = a + b
return self.acc