Examveda

How is the @classmethod decorator applied to a method in a class?

A. Using the @classmethod syntax above the class

B. Using the @classmethod syntax above the method

C. Using the @classmethod decorator within the method

D. By using the apply_classmethod() function

Answer: Option B

Solution (By Examveda Team)

The @classmethod decorator is applied above the method definition using the @classmethod syntax.

This Question Belongs to Python Program >> Decorators In Depth

Join The Discussion

Related Questions on Decorators in Depth