Method
__init__
(self, val, left=None, right=None)
Source from the content-addressed store, hash-verified
| 51 | class Node: |
| 52 | |
| 53 | def __init__(self, val, left=None, right=None): |
| 54 | self.val = val |
| 55 | if isinstance(left, Node) or left == None: |
| 56 | self.left = left |
| 57 | else: |
| 58 | self.left = self.construct(left) |
| 59 | |
| 60 | if isinstance(right, Node) or right == None: |
| 61 | self.right = right |
| 62 | else: |
| 63 | self.right = self.construct(right) |
| 64 | |
| 65 | def __str__(self): |
| 66 | |
Callers
nothing calls this directly
Tested by
no test coverage detected