Skip to main content

For Statement AST Python Object

The ForStatement object matches a Python function, module or object call.

The astType value for this node is forstatement.

Code Pattern

This AST element captures the following code.


for v, w in ...:
...

Attributes

  • variables (array of PythonExpression): list of variables in the for expression
  • list (type AstString): the list
  • statements (type AstString): the code for the statements
  • elseStatement (type PythonElseStatement): the code of the else statements