Skip to content

← programming package

EnumerateIterator

An iterator that yields 2-element lists made up of an index and the next item from a source iterable.

Can be used to iterate over a collection while keeping track of the current index. This node can be wired into a ForEach loop to iterate over a collection while keeping track of the current index. With each iteration, the integer and the item are yielded as a 2-element list to the ForEach node, which will then pass that list to the Placeholder node. You can then use BreakList after the Placeholder node to separate the index and the item in order to wire them into separate nodes in the loop body. Version 1.0.0

Ports/Properties

curindex

Current index.

  • verbose name: Curindex
  • default value: None
  • port type: DataPort
  • value type: int (can be None)
  • data direction: OUT

curitem

Current item.

  • verbose name: Curitem
  • default value: None
  • port type: DataPort
  • value type: object (can be None)
  • data direction: OUT

iterable

Data to iterate over.

  • verbose name: Iterable
  • default value: None
  • port type: DataPort
  • value type: object (can be None)
  • data direction: IN

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)

verbose

Whether to print the current item to the console.

  • verbose name: Verbose
  • default value: False
  • port type: BoolPort
  • value type: bool (can be None)