Class Method | Static Method |
requires “cls” as first parameter | does not require parameters |
has the ability to access the state of object | does not influence the state of the object |
method decorated with @classmethod | method decorated with @staticmethod |
they can be used to create objects | can be only used as a helper method |
More about @classmethod | More about @staticmethod |
Abstract Method |
requires to import abc package and abc.ABC as first parameter |
cannot be instanted, gives TypeError is tried to instantiate Abstract Class |
method decorated with @abstractmethod |
can be used as super class and implementation should be in subclass |
More about @abstractmethod |