Spot the bug in the decorator wrapper

from Decorators
Python 3.14 beginner 4 min 1 issue to find

The decorated function should still return the subtotal. Find the bug.

Python
from functools import wraps

def announce(func):
    @wraps(func)
    def wrapper(*args, **kwargs):
        print(f"calling {func.__name__}")
        func(*args, **kwargs)
    return wrapper

@announce
def subtotal(price, quantity):
    return price * quantity

print(subtotal(8, 3))
Open in playground
Report an error