Outils pour utilisateurs

Outils du site


tech:todo-pycontracts

PyContracts

Voir :

Voir aussi :

  • icontract
  • mypy

Voir programmation par contrat en générale :

pipenv install PyContracts
# 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
tech/todo-pycontracts.txt · Dernière modification : de 127.0.0.1

Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki