This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
from functools import wraps | |
# the f argument is a function that we pass | |
def base_wrapper(f): | |
# you need this in all wrappers/decorators | |
@wraps(f) | |
# the *args and **kwargs allow for passing | |
# arguments into the wrapped function; | |
# notice how we define a function within a | |
# function with a return value, and then |