[Python-ideas] Why is design-by-contracts not widely adopted?

Marko Ristin-Kaufmann marko.ristin at gmail.com
Mon Oct 8 02:22:05 EDT 2018


Hi Chris,

In other words, you change the *public interface* of your functions
> all the time? How do you not have massive breakage all the time?


I suppose that Pycharm helps the most with its refactoring tools. We use
type annotations, contracts, static checks (mypy, pylint, pydocstyle) and
unit, integration and end-to-end tests, so actually unexpected breakages in
production are not that frequent. What does happen often, though, is that
documentation gets stale.

Cheers,
Marko

On Mon, 8 Oct 2018 at 07:29, Chris Angelico <rosuav at gmail.com> wrote:

> On Mon, Oct 8, 2018 at 4:26 PM Marko Ristin-Kaufmann
> <marko.ristin at gmail.com> wrote:
> >> Not true for good docstrings.  We very seldom change the essential
> >> meaning of public functions.
> >
> > In my team, we have a stale docstring once every two weeks or even more
> often. If it weren't for doctests and contracts, I could imagine we would
> have them even more often :)
> >
>
> In other words, you change the *public interface* of your functions
> all the time? How do you not have massive breakage all the time?
>
> ChrisA
> _______________________________________________
> 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/20181008/78c025f4/attachment.html>


More information about the Python-ideas mailing list