17 Mar
2021
17 Mar
'21
11:05 p.m.
Sorry to be so late to the conversation but can someone point me to a discussion of why `TypeGaurd[T]` is not a subtype of bool? It seems a bit strange to not be able to pass a type guard as a filter e.g.: ``` def filter(f: Callable[[object], bool], xs: Sequence[object]) -> Sequence[object]: ... def is_int(x: object) -> TypeGaurd[int]: ... filter(is_int, [...]) # error? ```