idiombench / Python /train /3.8 /protocol /modern_20.py
SwashBuckler001's picture
IdiomBench (part 10)
c6ed2d8 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]]