I just learned something new that may be of interest to some devs. There are a few packages that add Programming By Contract to Python. In particular, iContract:
https://github.com/Parquery/icontract If you have not heard of this approach, it was introduced in the Eiffel language in the late 1980s. From Wikipedia: "It prescribes that software designers should define formal <https://en.wikipedia.org/wiki/Formal_methods>, precise and verifiable interface specifications for software components <https://en.wikipedia.org/wiki/Component-based_software_engineering#Software_component>, which extend the ordinary definition of abstract data types <https://en.wikipedia.org/wiki/Abstract_data_type> with preconditions <https://en.wikipedia.org/wiki/Precondition>, postconditions <https://en.wikipedia.org/wiki/Postcondition> and invariants. These specifications are referred to as "contracts", in accordance with a conceptual metaphor <https://en.wikipedia.org/wiki/Conceptual_metaphor> with the conditions and obligations of business contracts." -- You received this message because you are subscribed to the Google Groups "leo-editor" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/leo-editor/a87d091c-ad97-4e74-a75f-42b2dd2151a6n%40googlegroups.com.
