Added support for multi inheritance constructor calls.

parent 15abdd61
......@@ -3,6 +3,7 @@
class Node(object):
def __init__(self, value, *nodes):
super(Node, self).__init__()
self.value, self.nodes = value, list(nodes)
def __getitem__(self, n):
......@@ -33,6 +34,7 @@ class Node(object):
class Leaf(Node):
def __init__(self, value):
super(Leaf, self).__init__(value)
self.value = value
self.nodes = None
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment