{{tag>Code Python}} # PyContracts Voir : * [[Programmation par contrat]] * [[Notes - Python - Static type code analyzer]] * https://pypi.python.org/pypi/PyContracts * https://www.hillelwayne.com/post/contracts/ Voir aussi : * icontract * mypy ~~~bash pipenv install PyContracts ~~~ ~~~python # coding: utf-8 from contracts import contract #contracts.disable_all() @contract def div(a, b): """ Simple division :type a: int,>0 :type b: int,>0 :rtype: float,>0 """ return a / b ~~~