Mark the main differences between the methods declared with @staticmethod and the @classmethod by ticking the right boxes below.
Decorators in OOP
Differences
Report a typo
Choose one option for each row
@staticmethod | @classmethod | |
|---|---|---|
| Always takes class as the first parameter | ||
| Doesn't need any mandatory parameters | ||
| Similar to functions defined outside of the class | ||
| Often used as utility methods |
___
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.
Create a free account to access the full topic
By continuing, you agree to the JetBrains Academy Terms of Service as well as Hyperskill Terms of Service and Privacy Policy.