Popularity
2.9
Stable
Activity
10.0
Stable
343
15
18

Description

This module provides a collection of decorators that makes it easy to write software using contracts.

Contracts are a debugging and verification tool. They are declarative statements about what states a program must be in to be considered "correct" at runtime. They are similar to assertions, and are verified automatically at various well-defined points in the program. Contracts can be specified on functions and on classes.

Contracts serve as a form of documentation and a way of formally specifying program behavior. Good practice often includes writing all of the contracts first, with these contract specifying the exact expected state before and after each function or method call and the things that should always be true for a given class of object.

Contracts consist of two parts: a description and a condition. The description is simply a human-readable string that describes what the contract is testing, while the condition is a single function that tests that condition. The co

Programming language: Python
License: GNU Lesser General Public License v3.0 only

dpcontracts alternatives and similar packages

Based on the "Functional Programming" category.
Alternatively, view contracts alternatives based on common mentions on social networks and blogs.

Do you think we are missing an alternative of dpcontracts or a related project?

Add another 'Functional Programming' Package