Utility Classes
Overview
With only the included accepts, returns and yields decorators, we can make fairly simple assertions about the type of an object, even leveraging Python's built-in types to create more complex type signatures.
While these are certainly not insignificant, they are of fairly limited utility out in the real world.
To the end of providing useful, real world-tested typechecking capabilities, we've designed a system of "utility classes" to make complex and precise assertions about the objects entering and leaving a function.
All utility classes live in the typecheck module.
To import, say, IsAllOf:
from typecheck import IsAllOf
The section on typeclasses might also be of interest.
Section Index
Boolean Expressions
- IsAllOf, aka And
- IsOneOf, aka Or
- IsOnlyOneOf, aka Xor
- IsNoneOf, aka Not
Miscellaneous