Python Forum
Multiple Inheritance - Help pls!
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Multiple Inheritance - Help pls!
#1
class Class(Superclass1, Superclass2):
    def __init__(self):
        super().__init__() #Superclass2
        super().__init__() #Superclass1

    def __repr__(self):
        '''I need it to work concatenating Superclass1 and Superclass2''' 
        return super().__repr__() + ' ' + super().__repr__()
Is it possible or will it inherit from Superclass1 in every method?
Reply


Messages In This Thread
Multiple Inheritance - Help pls! - by magnusbrigido - May-17-2019, 01:47 AM

Possibly Related Threads…
Thread Author Replies Views Last Post
  Multiple inheritance - the right way ? denis_beurive 6 4,645 Feb-14-2019, 09:24 AM
Last Post: denis_beurive
  Multiple Inheritance using super() Sagar 2 7,301 Sep-08-2017, 08:58 AM
Last Post: Sagar

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020