ArgumentsAccessor

class ArgumentsAccessor

A convencience accessor for instantiation arguments.

This is a wrapper around LazyIterator that additionally allows appending new arguments without having to create intermediate features. Arguments are input feature value expressions from:

  • InvocationExpression.children

  • ConstructorExpression.result.children

Arguments can be removed by removing elements from the corresponding children containers.

%3 ArgumentsAccessor ArgumentsAccessor syside.ArgumentsAccessor LazyIterator LazyIterator syside.LazyIterator LazyIterator->ArgumentsAccessor
Members defined in ArgumentsAccessor (1 member)

append

Append a new invocation argument.

Members inherited from LazyIterator (7 members)

__bool__

Returns True if this range is not empty.

__getitem__

Get value at index, This is computed lazily. Throws IndexError on out of bounds.

at

Get value at index. This is computed lazily. Returns None for out of bounds index.

collect

Collect all items into a list.

count

Count the number of items in this range. This is computed lazily.

empty

Check if this range is empty.

for_each

Lazily visit each item in this range. Visitation is stopped on returning False or VisitAction.Stop;

Methods

append(arg: syside.ArgumentsAccessor.append.M, /) tuple[syside.FeatureValue, syside.ArgumentsAccessor.append.M]

Append a new invocation argument.

This takes care of constructing any intermediate elements.

Returns a pair of (feature_value, argument).

append(arg: type[syside.ArgumentsAccessor.append.M], /) tuple[syside.FeatureValue, syside.ArgumentsAccessor.append.M]

Append a new invocation argument with the corresponding type.

This takes care of constructing any intermediate elements.

Returns a pair of (feature_value, argument).

Used in