Skip to content

Get

get

get(*source: Retriever | int) -> Get

Fetches the value of a retriever. If the resulting value is an int, it's result can be manipulated with int operations. For example, get(Struct1.sub_struct1, SubStruct1.sub_list1, 1, SubStruct2.property)+1 is like doing struct1.sub_struct1.sub_list1[1].property+1

Parameters:

  • *source (Retriever | int, default: () ) –

    The retriever path to fetch the value from. This can be a sequence of retrievers/list indices starting in the current struct

Returns:

  • Get

    An instance encoding the retriever path and manipulations to perform during parsing

Raises:

  • ValueError

    If the value at the source path is not an int, and int operations are attempted

get_len

get_len(*source: Retriever | int) -> Get

Fetches the length of a list-valued retriever. It's result can be manipulated with operations. For example, get_len(Struct1.sub_struct1, SubStruct1.sub_list1)-1 is like doing len(struct1.sub_struct1.sub_list1)-1

Parameters:

  • *source (Retriever | int, default: () ) –

    The retriever path to fetch the value from. This can be a sequence of retrievers/list indices starting in the current struct

Returns:

  • Get

    An instance encoding the retriever path and manipulations to perform during parsing

Raises:

  • ValueError

    If the value at the source path is not a list

Get

Encodes and performs manipulations on retriever values before passing them to combinators as inputs. For example, it can be used to add the value of two retrievers.

__add__

__add__(other: Get | int) -> Get

__and__

__and__(other: Get | int) -> Get

__div__

__div__(other: Get | int) -> Get

__invert__

__invert__() -> Get

__mod__

__mod__(other: Get | int) -> Get

__mul__

__mul__(other: Get | int) -> Get

__neg__

__neg__() -> Get

__or__

__or__(other: Get | int) -> Get

__radd__

__radd__(other: Get | int) -> Get

__rand__

__rand__(other: Get | int) -> Get

__rdiv__

__rdiv__(other: Get | int) -> Get

__rmod__

__rmod__(other: Get | int) -> Get

__rmul__

__rmul__(other: Get | int) -> Get

__ror__

__ror__(other: Get | int) -> Get

__rsub__

__rsub__(other: Get | int) -> Get

__rxor__

__rxor__(other: Get | int) -> Get

__sub__

__sub__(other: Get | int) -> Get

__xor__

__xor__(other: Get | int) -> Get