NoneNode¶
NoneNode
¶
Bases: BaseNode
A null object node representing an empty tree branch.
Source code in imote/nodes/none_node.py
4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 | |
get_children() -> List[BaseNode]
¶
Returns this node's children.
Returns:
| Type | Description |
|---|---|
List[BaseNode]
|
Empty list, a NoneNode has no children. |
Source code in imote/nodes/none_node.py
12 13 14 15 16 17 18 | |
get_label() -> str
¶
Returns the full display label for this node.
Returns:
| Type | Description |
|---|---|
str
|
The string "None". |
Source code in imote/nodes/none_node.py
20 21 22 23 24 25 26 | |
get_minimal_label() -> str
¶
Returns a short display label for this node.
Returns:
| Type | Description |
|---|---|
str
|
Empty string. |
Source code in imote/nodes/none_node.py
28 29 30 31 32 33 34 | |
to_dict() -> dict
¶
Serializes the node to a dictionary.
Returns:
| Type | Description |
|---|---|
dict
|
Dictionary with a single "node_type" marker. |
Source code in imote/nodes/none_node.py
36 37 38 39 40 41 42 | |
from_dict(dic: dict) -> NoneNode
classmethod
¶
Reconstructs a NoneNode instance.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
dic
|
dict
|
Unused |
required |
Returns:
| Type | Description |
|---|---|
NoneNode
|
A new NoneNode instance. |
Source code in imote/nodes/none_node.py
44 45 46 47 48 49 50 51 52 53 54 55 56 | |