Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
# USEFUL for extending functionality of functions you don't wanna modify
# this function takes a function as its parameter
def decorator(function):
def wrap():
print("Adding Printing Functionality")
print("Adding Print Functionality")
return wrap
def print_function():
print("Print by the print Function")
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment