Python Programming - Decorators - Discussion
Discussion Forum : Decorators - General Questions (Q.No. 15)
15.
How does the
@staticmethod
decorator differ from the @classmethod
decorator?
Answer: Option
Explanation:
@staticmethod
allows a method to be called on both instances and the class itself, while @classmethod
is specifically for class-level attribute access and can only be called on instances.
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