Static methods – How to call a method from another method?

How do I have to do in Python for calling an static method from another static method of the same class?

class Test():
    @staticmethod
    def static_method_to_call():
        pass

    @staticmethod
    def another_static_method():
        Test.static_method_to_call()

    @classmethod
    def another_class_method(cls):
        cls.static_method_to_call()

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)