decorator module: Write Shorter Python Decorators without Nested Functions
Have you ever wished to write a Python decorator with only one function instead of nested functions? If so, try decorator.
In the code above, time_func and time_func_with_decorator produce the exact same results except that time_func_with_decorator is easier and short to write.
Check out other things the decorator library can do.
Link to the source code.
decorator module: Write Shorter Python Decorators without Nested Functions Read More »









