pyccel.ast.itertoolsext module

pyccel.ast.itertoolsext module#

This module represent a call to the itertools functions for code generation.

class pyccel.ast.itertoolsext.Product(*args)[source]View on GitHub#

Bases: Iterable

Represents a call to itertools.product for code generation.

Represents a call to itertools.product for code generation.

Parameters:

*args (PyccelAstType) – The arguments passed to the product function.

property elementsView on GitHub#

get expression’s elements

get_python_iterable_item()[source]View on GitHub#

Get the item of the iterable that will be saved to the loop targets.

This is an element from each of the variables indexed using the iterators previously provided via the set_loop_counters method.

Returns:

A list of objects that should be assigned to variables.

Return type:

list[TypedAstNode]