[Python-ideas] Pre-conditions and post-conditions

Elazar elazarg at gmail.com
Thu Aug 16 03:18:55 EDT 2018


You might also be interested in pep-563
<https://www.python.org/dev/peps/pep-0563/>. although it is not intended
for design by contract, it can help (syntactically).

Elazar

On Wed, Aug 15, 2018 at 11:07 PM Marko Ristin-Kaufmann <
marko.ristin at gmail.com> wrote:

> Hi,
>
> I would be very interested to bring design-by-contract into python 3. I
> find design-by-contract particularly interesting and indispensable for
> larger projects and automatic generation of unit tests.
>
> I looked at some of the packages found on pypi and also we rolled our own
> solution (https://github.com/Parquery/icontract/). I also looked into
> https://www.python.org/dev/peps/pep-0316/.
>
> However, all the current solutions seem quite clunky to me. The decorators
> involve an unnecessary computational overhead and the implementation of
> icontract became quite tricky once we wanted to get the default values of
> the decorated function.
>
> Could somebody update me on the state of the discussion on this matter?
>
> I'm very grateful for any feedback on this!
> _______________________________________________
> Python-ideas mailing list
> Python-ideas at python.org
> https://mail.python.org/mailman/listinfo/python-ideas
> Code of Conduct: http://python.org/psf/codeofconduct/
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.python.org/pipermail/python-ideas/attachments/20180816/9063b692/attachment.html>


More information about the Python-ideas mailing list