ID EN
Built-in Functions

super

Python 3.11 🇮🇩 Bahasa Indonesia

Mengembalikan objek proksi yang mendelegasikan pemanggilan metode ke tipe kelas induk atau saudara. Ini berguna untuk mengakses metode warisan yang telah ditimpa di suatu kelas.

Syntax

PYTHON
class super

Contoh

Example 1
PYTHON
class C(B):
    def method(self, arg):
        super().method(arg)     This does the same thing as:
                                super(C, self).method(arg)

See Also

method resolution order __mro__ super() __mro__ getattr() super() super() descriptors