Skip to content
Sharp

Advanced Python · interview question

Which naming or modeling choice is strongest for simple decorators?

Multiple choiceMediumchapter-14-curatedpremiumadvanced-pythonsimple-decorators
python
def log_calls(fn):
    def wrapper(*args, **kwargs):
        print(f"calling {fn.__name__}")
        return fn(*args, **kwargs)
    return wrapper
Choose one answer
Answer and explanation

Correct answer

D. Use names and structures that describe the business fact directly instead of temporary implementation noise.

Why

Clear naming and modeling shorten debugging, review, and onboarding time.

Test yourself on Advanced Python

A free test with instant, explained results. No account needed.

Start free test
All Advanced Python questions →