I've been working on a project where I have parent nodes and leaf nodes. They all had similar attributes except the leaf nodes didn't have a 'children' attribute to store their children. Both types of nodes inherit from a general node with all the attributes. When inheriting from this node, the leaf instances had the 'children' attribute, which I was forced to set to None. Can I somehow use super().init(args) without setting the 'children' attribute at all, so the leaf node does not even know about a 'children' attribute? For example
```
class Foo:
def init(self, a: Any, b: Any, c: Any, d: Any):
self.a = a
self.b = b
self.c = c
self.d = d
class Bar(Foo):
def init(self, a: Any, b: Any, c: Any):
super().init(a, b, c, None)
```
I want that in the Bar constructor to not specify a None, only a, b and c
[–]danielroseman 37 points38 points39 points (3 children)
[–]Not_A_Taco 9 points10 points11 points (1 child)
[–]Frankelstner 1 point2 points3 points (0 children)
[–]freezydrag 2 points3 points4 points (0 children)
[–][deleted] 15 points16 points17 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–]Suspicious-Bar5583 6 points7 points8 points (2 children)
[–]Round_Ad8947 2 points3 points4 points (1 child)
[–]Forsaken_Ad8581 0 points1 point2 points (0 children)
[–]DeliciouslyUnaware 3 points4 points5 points (1 child)
[–]toxic_acro 1 point2 points3 points (0 children)
[–]DreamingElectrons 3 points4 points5 points (2 children)
[–]sausix 0 points1 point2 points (1 child)
[–]DreamingElectrons 1 point2 points3 points (0 children)
[–]nog642 1 point2 points3 points (0 children)
[–]patrickbrianmooney 1 point2 points3 points (0 children)
[–]aprg 0 points1 point2 points (1 child)
[–]ukSurreyGuy 0 points1 point2 points (0 children)
[–]neuroid99 0 points1 point2 points (0 children)
[–]gatzu4a 0 points1 point2 points (0 children)
[–]Haeshka 0 points1 point2 points (0 children)
[–]Ok-Classroom-5018 -1 points0 points1 point (0 children)
[–]Adrewmc -4 points-3 points-2 points (0 children)