4 ms·
In Python 3 a similar thing looks better with the use of "function annotations": http://code.activestate.com/recipes/572161/ http://code.activestate.com/recipes
by targeted 15y ago
In Python 3 a similar thing looks better with the use of "function annotations": http://code.activestate.com/recipes/572161/ http://code.activestate.com/recipes/572161/
There also are a few modules out there that implement design-by-contract's pre-/post-conditions for class instances, for example http://code.activestate.com/recipes/436834/ http://code.activestate.com/recipes/436834/