ListSort¶
Sort the given list, optionally with a function that extracts a comparison key from a given list element (e.g
., StringLower). The sort is stable, i.e., it preserves the relative order of elements that compare equal. Version 1.0.0
Ports/Properties¶
lst¶
Data to process.
- verbose name: Lst
- default value: None
- port type: DataPort
- value type: list (can be None)
- data direction: INOUT
key¶
Key extraction function.
- verbose name: Key
- default value: None
- port type: GraphPort
- value type: Graph
key__signature¶
Optional name of a placeholder that will receive the list element from which to extract the sort key. You can define a key extraction function by creating a graph that starts with a Placeholder node whose slotname must be set to the same name as listed here (e.g., "item"), followed by some computation (e.g., a use of GetNested), and whose final node returns the sort key. That final node is then wired into the "key" input port of ListSort). In graphical UIs this edge will show as dotted to indicate that this is not normal forward data flow but a subgraph (i.e., the key function) is being passed to the List Sort node. The key extraction function is called for each element in the list, and the result of the function is used to sort the list. If the key extraction function is not specified, the list elements are sorted directly. This graph should only involve stateless nodes.
- verbose name: Key [Optional Sort Key Argument]
- default value: (item)
- port type: Port
- value type: object (can be None)
reversed¶
If True, sort in reverse order.
- verbose name: Reversed
- default value: False
- port type: BoolPort
- value type: bool (can be None)
set_breakpoint¶
Set a breakpoint on this node. If this is enabled, your debugger (if one is attached) will trigger a breakpoint.
- verbose name: Set Breakpoint (Debug Only)
- default value: False
- port type: BoolPort
- value type: bool (can be None)
metadata¶
User-definable meta-data associated with the node. Usually reserved for technical purposes.
- verbose name: Metadata
- default value: {}
- port type: DictPort
- value type: dict (can be None)