Spice up your code with wrappers! In Python, a wrapper, also known as a decorator, is simply encapsulating a function within other functions. @wrapper def my_func(a, b=2): print(b) @meta_decorator(foo=”bar”) def my_other_func(**kwargs): print(kwargs) In Reusables, all the wrappers take arguments, aka meta decorators, so you will at...
Continue reading...wrappers
Python Decorators
Often times in python there comes a need to have multiple functions act in a similar manner. It could be anything from making sure that similar functions output the right type of result, they all log when they are called or all report exceptions in the...
Continue reading...