On Tue, Aug 21, 2018 at 09:06:54AM +0200, Marko Ristin-Kaufmann wrote: > Is there any chance to introduce these constructs in the language or is it > too small a feature for such a big change?
I don't think contracts is a small feature. I think it is a HUGE feature, but under-appreciated by most developers. (Probably due to unfamiliarity, and the difficulty in using it in a language with no syntactic support.) Whether it is practical to add it to Python, I don't know. I suspect that we would have to develop some sort of third-party solution first, even if it did not do everything contracts ought to do (or do them less efficiently) as a proof of concept. PyContracts is probably a good place to start. For those who missed Wes' email: https://andreacensi.github.io/contracts/ Cobra is another good place to look, as it demonstrates a nice syntax that reads like a cross between Python and Eiffel: http://cobra-language.com/trac/cobra/wiki/Contracts -- Steve _______________________________________________ Python-ideas mailing list Python-ideas@python.org https://mail.python.org/mailman/listinfo/python-ideas Code of Conduct: http://python.org/psf/codeofconduct/