From 7ee5dd6cb0f7f9f972bb2d90945be3f8319f160f Mon Sep 17 00:00:00 2001 From: Gram Date: Sat, 6 Jul 2019 10:21:48 +0200 Subject: [PATCH] improve docs --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index 9bd2be65..b927c60e 100644 --- a/README.md +++ b/README.md @@ -18,6 +18,19 @@ That's nice `assert` statements in decorators style to validate function input, ## Available decorators +CLassic DbC: + +* `@deal.pre` -- validate function arguments (pre-condition) +* `@deal.post` -- validate function return value (post-condition) +* `@deal.inv` -- validate object internal state (invariant) + +Take more control: + +* `@deal.offline` -- forbid network requests +* `@deal.raises` -- allow only list of exceptions +* `@deal.safe` -- forbid exceptions +* `@deal.silent` -- forbid output into stderr/stdout. + ## Installation ```bash @@ -73,3 +86,5 @@ p = Post() p.visits = -1 # InvContractError: ``` + +Dive deeper on [deal.readthedocs.io](https://deal.readthedocs.io/).