Burgerlib Python
Loading...
Searching...
No Matches
Public Member Functions | Public Attributes | List of all members
burger.Node Class Reference

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.
 

Detailed Description

Node class for creating directory trees.

Needed for some projects that have to store file entries in nested trees

Constructor & Destructor Documentation

◆ __init__()

def burger.Node.__init__ (   self,
  value,
  children = None 
)

Create a node with an initial value.

Parameters
valueObject to be the value of this node
childrenArray of nodes to be added as children to this one

Member Function Documentation

◆ __repr__()

def burger.Node.__repr__ (   self,
  level = 0 
)

Display this node as a string.

Parameters
levelRecursion depth (Used internally)

◆ __str__()

def burger.Node.__str__ (   self,
  level = 0 
)

Display this node as a string.

Parameters
levelRecursion depth (Used internally)