Python Programming - Decorators - Discussion
Discussion Forum : Decorators - General Questions (Q.No. 5)
5.
What happens when you use the
@classmethod
decorator on a method in a Python class?
Answer: Option
Explanation:
The
@classmethod
decorator is used to convert a method into a class method, allowing it to access and modify class-level attributes, rather than instance-level attributes.
Discussion:
Be the first person to comment on this question !
Post your comments here:
Quick links
Quantitative Aptitude
Verbal (English)
Reasoning
Programming
Interview
Placement Papers