Examveda
Examveda

How do you create a decorator that takes arguments?

A. Using the @decorator syntax

B. By using the @decorator(arg) syntax

C. By using the @decorator() syntax

D. By using the decorator(arg) function

Answer: Option B

Solution(By Examveda Team)

A decorator that takes arguments is applied using the @decorator(arg) syntax.

This Question Belongs to Python Program >> Decorators In Depth

Join The Discussion

Related Questions on Decorators in Depth