Comment

Comment by renewiltord

No no, I understand the problem you're talking about. It is a problem. I'm asking about the solution. Why wouldn't you handle it in the child instead of having siblings be superable?

Essentially, why not do it like this:

    class A():
        def __init__(self):
          self.x = 1

    class B():
        def __init__(self):
          self.y = 2

    class C(A, B):
        def __init__(self):
            A.__init__(self)
            B.__init__(self)

    print(C().y)
parent renewiltord 6 years ago

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton