#post
python-pycontracts
A concise way to express input/output constraints on a function via a @contract
decorator.
Not intended as a replacement for type hints, but for value checking. For example:
-
the
list[int]
passed in must contain at least 3 ints that are all >=0 -
learned about it from this Reddit comment