Burgerlib Python
|
Node class for creating directory trees. More...
Public Member Functions | |
def | __init__ (self, value, children=None) |
Create a node with an initial value. More... | |
def | __repr__ (self, level=0) |
Display this node as a string. More... | |
def | __str__ (self, level=0) |
Display this node as a string. More... | |
Public Attributes | |
value | |
Value contained in this node. | |
children | |
Array of children nodes to this node. | |
Node class for creating directory trees.
Needed for some projects that have to store file entries in nested trees
def burger.Node.__init__ | ( | self, | |
value, | |||
children = None |
|||
) |
Create a node with an initial value.
value | Object to be the value of this node |
children | Array of nodes to be added as children to this one |
def burger.Node.__repr__ | ( | self, | |
level = 0 |
|||
) |
Display this node as a string.
level | Recursion depth (Used internally) |
def burger.Node.__str__ | ( | self, | |
level = 0 |
|||
) |
Display this node as a string.
level | Recursion depth (Used internally) |