Python Programming - Decorators - Discussion

Discussion Forum : Decorators - General Questions (Q.No. 13)
13.
What does the @staticmethod decorator do when applied to a method inside a class?
Converts the method to a class method
Marks the method as a static method
Indicates the method is an instance method
Decorates the method with dynamic behavior
Answer: Option
Explanation:
The @staticmethod decorator is used to mark a method as a static method within a class, indicating that it belongs to the class and not to an instance.
Discussion:
Be the first person to comment on this question !

Post your comments here:

Your comments will be displayed after verification.