Skip to content

Instantly share code, notes, and snippets.

View unanoc's full-sized avatar
💜
the best code is the code that doesn't exist

daniel unanoc

💜
the best code is the code that doesn't exist
View GitHub Profile
@unanoc
unanoc / decorator.py
Last active December 23, 2018 18:56
python3 decorator
from functools import wraps
def decorator(argument1=False, argument2=False):
def real_decorator(function):
@wraps(function)
def wrapper(*args, **kwargs):
if argument1 and argument2:
print(" Decorator with arguments!")
result = function(*args, **kwargs)