1 2 3 4 5 6 7 8 9 10 11
def property_decorator(key): def decorator(value): def wrapper(func): setattr(func, key, value) return func return wrapper return decorator