PEP 724: Stricter Type Guards

How about the simple TypeCheck? To my eyes, that suggests a binary nature of the outcome, in the sense that something failing a TypeCheck[T] isn’t a T.

(On that same note, I thought that TypeGuard was quite aptly named in that it doesn’t have a strict binary connotation.)

1 Like