Instance vs Class vs Static Method

Python
Author

Imad Dabbura

Published

December 4, 2022

A Python class can have three kinds of methods:

class C:
    
    def instance_method(self):
        pass
    
    @classmethod
    def class_method(cls):
        pass
    
    @staticmethod
    def static_method():
        pass