Examveda
Examveda

What is the difference between a class-based decorator and a function-based decorator?

A. Class-based decorators use fewer resources

B. Class-based decorators can't accept arguments

C. Function-based decorators are more flexible

D. Function-based decorators are slower

Answer: Option C

Solution(By Examveda Team)

Function-based decorators are generally more flexible and can accept arguments more easily than class-based decorators.

This Question Belongs to Python Program >> Decorators In Depth

Join The Discussion

Related Questions on Decorators in Depth