Quick actions

cmd+k|ctrl+k

Navigation

Languages

Decorators

Snippet info

Language

Python

Visibility

public

Author

projectsfiae

Created

2025-08-28T20:28:36.203495Z

Updated

2025-08-28T21:44:12.175071Z

# is super boost a func. 

def some_decorator(func):
    def wrap_func():
        print('********')
        func()
        print('********')
    return wrap_func
    
@some_decorator
def hello():
    print('hellooo!')
    
hello()

from time import time
def performance(fn):
    def wrapper(*args, **kwargs):
        t1 = time()
        result = fn(*args, **kwargs)
        t2 = time()
        print(f'took {t2 - t1} s')
        return result
    return wrapper
    
    
@performance
def long_time():
    for i in range(1000000):
        i*5


long_time()

#Excercise




INFO