Which decorator defines a method that receives neither self nor cls in Python?
Correct answer
C. @staticmethod
6 views
C. @staticmethod
6 views
A static method is a plain function namespaced inside a class.
Asked in: Python Interview OOP
https://docs.python.org/3/tutorial/classes.htmlNot sure why the answer is C? Ask here and get an explanation.