Type validation in Python using decorators
So in Python you generally do test driven development to make sure that you don’t get weird type errors. Sometimes, however, it’s good to be alerted immediately, so I’ve made a small decorator which can check for types of arguments as follows: