Put in order · Python course · Module 3: Object-Oriented Programming
Types of Methods in a Class
Arrange the method types by their first parameter: first those that receive the object (self), then the class (cls), and last those with neither self nor cls:
Items to put in order
- @classmethod (cls)
- Instance method (self)
- @staticmethod (no self/cls)
- @property (getter/setter)
You can check the correct answer by solving this task in the CodeWorlds game.