API reference

python:astx:astx.CollectionIndex

class CollectionIndex

CollectionIndex(base: astx.AST, value: astx.AST)

Source: packages/astx/src/astx/collections/common.py:167

Declared as: python:astx:astx.collections.common.CollectionIndex

Common sequence index query node.

Return the first zero-based index of a value in a list or tuple. The initial ASTx contract returns -1 when the value is not found.

Attributes

Methods

Attributes

Search documentation

Type to search.