"""Decorator that prints time info.""" def wrapper(*args, **kwargs): start = time.time() result = func(*args, **kwargs) end = time.time() print(func.__name__, end - start) return result return wrapper
"""Decorator that prints time info.""" def wrapper(*args, **kwargs): start = time.time() result = func(*args, **kwargs) end = time.time() print(func.__name__, end - start) return result return wrapper
"""Decorator that prints time info.""" def wrapper(*args, **kwargs): start = time.time() result = func(*args, **kwargs) end = time.time() print(func.__name__, end - start) return result return wrapper
"""Decorator that prints time info.""" def wrapper(*args, **kwargs): start = time.time() result = func(*args, **kwargs) end = time.time() print(func.__name__, end - start) return result return wrapper
wrapper(*args, **kwargs): result = func(*args, **kwargs) result = Decimal(str(result)) result = result.quantize(Decimal(".01")) return "{} {}".format(symbol, result) return wrapper return decorate Take it another level!