What does the @staticmethod decorator do?
- A Makes a method callable without an instance and without receiving self or cls
- B Prevents the method from being overridden
- C Caches the method's return value
- D Makes the method private
Answer
Makes a method callable without an instance and without receiving self or cls
A staticmethod is a plain function namespaced inside the class. A classmethod receives cls and is typically used for alternative constructors.





