structs package¶
Submodules¶
structs.stack module¶
structs.tree module¶
- class structs.tree.BinaryTreeNode(value, left=None, right=None)¶
Bases:
object
A class representing a node in a binary tree.
- Attributes:
__value: The value of the node. __left: The left child of the node. __right: The right child of the node.
- classmethod copy(node)¶
Creates a new copy of the given node.
- classmethod deep_copy(node)¶
Creates a new deep copy of the given node.
- getLeft()¶
- getRight()¶
- getValue()¶
- isValue(value)¶
Checks if the node value is an instance of a class of the given value and compares the value.
- is_id()¶
” Returns true if the node value is an identifier.
- is_name()¶
Returns true if the node value is a name.
- setLeft(left)¶
- setRight(right)¶
- setValue(value)¶