All challenges
Multiple ChoiceIntermediate 30s

functools.wraps

Choose the best answer for: @wraps
Options
  1. 1@wraps adds logging statements around the wrapped function
  2. 2@wraps is optional and never needed for correct decorators
  3. 3@wraps is the same as applying @staticmethod to a method
  4. 4@wraps preserves the wrapped function's metadata

Think you can answer under pressure?

Get matched and answer live questions in 3-minute 1v1 battles. Elo ranking, badge tiers and bragging rights on the line.

Play this in a 3-minute battle