LazyImportsIterator
- class LazyImportsIterator[T: Element]
An internally iterated generator for
Elementattributes that may include imported members.for member in package.members.with_import_filter(...).collect(): ...
Evaluation of import filters requires an explicit evaluator function because the model is treated as a data structure. It has no knowledge of expression evaluation semantics. In addition, this allows reusing virtual machines between different methods for improved performance.
Members defined in
LazyImportsIterator(1 member)
Use the provided function to evaluate import filters.
Members inherited from
LazyIterator(7 members)
Returns
Trueif this range is not empty.
Get value at index, This is computed lazily. Throws
IndexErroron out of bounds.
Get value at index. This is computed lazily. Returns
Nonefor out of bounds index.
Collect all items into a
list.
Count the number of items in this range. This is computed lazily.
Check if this range is empty.
Lazily visit each item in this range. Visitation is stopped on returning
FalseorVisitAction.Stop; Methods
- with_import_filter(arg: syside.CompilerFilter | Callable[[syside.Element, list[syside.Expression]], bool], /) syside.LazyImportsIterator[syside.T]
Use the provided function to evaluate import filters.
Note that this creates a copy of
selfwith the newfilterfunction.