Question OOP-CLS-0076
HardIn Python, what is the difference between @staticmethod and @classmethod?
- A.
They are identical
- B.
A classmethod can't be called on instances
- C.
Sign up free to see the answer and a step-by-step explanation.
Popular companies
Prepare company by company
Hiring pattern, syllabus, past questions and mocks for each company.
All companiesPractice by subject
Classes and Objects question
In Python, what is the difference between @staticmethod and @classmethod?
They are identical
A classmethod can't be called on instances
Sign up free to see the answer and a step-by-step explanation.
A staticmethod receives the class
A staticmethod receives neither the instance nor the class; a classmethod receives the class