idiombench / Python /train /3.13 /protocol /modern_20.py
SwashBuckler001's picture
IdiomBench (part 7)
5eb110b verified
Raw History Blame Contribute Delete
192 Bytes
from typing import TypeVar, Reversible, Iterable, Sized
T = TypeVar('T')
class SizedIterable(Iterable[T], Sized, Protocol):
pass
CompatReversible = Union[Reversible[T], SizedIterable[T]]