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]#

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 elements#

get expression’s elements

get_python_iterable_item()[source]#

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]