[Python] Python Method overriding, does signature matter?

Discussão em 'Python' iniciado por Stack, Julho 27, 2025.

  1. Stack

    Stack Membro Participativo

    Lets say I have

    class Super():
    def method1():
    pass

    class Sub(Super):
    def method1(param1, param2, param3):
    stuff


    Is this correct? Will calls to method1 always go to the sub class? My plan is to have 2 sub classes each override method1 with different params

    Continue reading...

Compartilhe esta Página