_typing.py 319 B

123456789101112
  1. from typing import TypeVar, Protocol
  2. T = TypeVar('T')
  3. class RingElement(Protocol):
  4. def __add__(self: T, other: T, /) -> T: ...
  5. def __sub__(self: T, other: T, /) -> T: ...
  6. def __mul__(self: T, other: T, /) -> T: ...
  7. def __pow__(self: T, other: int, /) -> T: ...
  8. def __neg__(self: T, /) -> T: ...