Skip to content

operator

Add dataclass

Add(*, left: Any = None, right: Any = None)

Bases: LazyOperator

A lazy operator for addition.

eval

eval(**values: Any) -> Any

Evaluate the lazy value with the given values.

Parameters:

Name Type Description Default
**values Any

Values to be used for evaluation.

{}

Returns:

Name Type Description
Any Any

The evaluated value.

Raises:

Type Description
ValueError

If the lazy value is not ready to be evaluated.

partial

partial(**values: Any) -> Any

Partially evaluate the lazy value with the given values.

Parameters:

Name Type Description Default
**values Any

Values to be used for evaluation.

{}

Returns:

Name Type Description
Any Any

The partially evaluated value.

ready

ready() -> bool

Check if the lazy value is ready to be evaluated.

keys

keys() -> set[str]

Get the keys that are required to evaluate the lazy value.

Sub dataclass

Sub(*, left: Any = None, right: Any = None)

Bases: LazyOperator

A lazy operator for subtraction.

eval

eval(**values: Any) -> Any

Evaluate the lazy value with the given values.

Parameters:

Name Type Description Default
**values Any

Values to be used for evaluation.

{}

Returns:

Name Type Description
Any Any

The evaluated value.

Raises:

Type Description
ValueError

If the lazy value is not ready to be evaluated.

partial

partial(**values: Any) -> Any

Partially evaluate the lazy value with the given values.

Parameters:

Name Type Description Default
**values Any

Values to be used for evaluation.

{}

Returns:

Name Type Description
Any Any

The partially evaluated value.

ready

ready() -> bool

Check if the lazy value is ready to be evaluated.

keys

keys() -> set[str]

Get the keys that are required to evaluate the lazy value.

Mul dataclass

Mul(*, left: Any = None, right: Any = None)

Bases: LazyOperator

A lazy operator for multiplication.

eval

eval(**values: Any) -> Any

Evaluate the lazy value with the given values.

Parameters:

Name Type Description Default
**values Any

Values to be used for evaluation.

{}

Returns:

Name Type Description
Any Any

The evaluated value.

Raises:

Type Description
ValueError

If the lazy value is not ready to be evaluated.

partial

partial(**values: Any) -> Any

Partially evaluate the lazy value with the given values.

Parameters:

Name Type Description Default
**values Any

Values to be used for evaluation.

{}

Returns:

Name Type Description
Any Any

The partially evaluated value.

ready

ready() -> bool

Check if the lazy value is ready to be evaluated.

keys

keys() -> set[str]

Get the keys that are required to evaluate the lazy value.

TrueDiv dataclass

TrueDiv(*, left: Any = None, right: Any = None)

Bases: LazyOperator

A lazy operator for true division.

eval

eval(**values: Any) -> Any

Evaluate the lazy value with the given values.

Parameters:

Name Type Description Default
**values Any

Values to be used for evaluation.

{}

Returns:

Name Type Description
Any Any

The evaluated value.

Raises:

Type Description
ValueError

If the lazy value is not ready to be evaluated.

partial

partial(**values: Any) -> Any

Partially evaluate the lazy value with the given values.

Parameters:

Name Type Description Default
**values Any

Values to be used for evaluation.

{}

Returns:

Name Type Description
Any Any

The partially evaluated value.

ready

ready() -> bool

Check if the lazy value is ready to be evaluated.

keys

keys() -> set[str]

Get the keys that are required to evaluate the lazy value.

Pow dataclass

Pow(*, left: Any = None, right: Any = None)

Bases: LazyOperator

A lazy operator for exponentiation.

eval

eval(**values: Any) -> Any

Evaluate the lazy value with the given values.

Parameters:

Name Type Description Default
**values Any

Values to be used for evaluation.

{}

Returns:

Name Type Description
Any Any

The evaluated value.

Raises:

Type Description
ValueError

If the lazy value is not ready to be evaluated.

partial

partial(**values: Any) -> Any

Partially evaluate the lazy value with the given values.

Parameters:

Name Type Description Default
**values Any

Values to be used for evaluation.

{}

Returns:

Name Type Description
Any Any

The partially evaluated value.

ready

ready() -> bool

Check if the lazy value is ready to be evaluated.

keys

keys() -> set[str]

Get the keys that are required to evaluate the lazy value.

Neg dataclass

Neg(*, left: Any = None, right: Any = None)

Bases: LazyOperator

A lazy operator for negation.

eval

eval(**values: Any) -> Any

Evaluate the lazy value with the given values.

Parameters:

Name Type Description Default
**values Any

Values to be used for evaluation.

{}

Returns:

Name Type Description
Any Any

The evaluated value.

Raises:

Type Description
ValueError

If the lazy value is not ready to be evaluated.

partial

partial(**values: Any) -> Any

Partially evaluate the lazy value with the given values.

Parameters:

Name Type Description Default
**values Any

Values to be used for evaluation.

{}

Returns:

Name Type Description
Any Any

The partially evaluated value.

ready

ready() -> bool

Check if the lazy value is ready to be evaluated.

keys

keys() -> set[str]

Get the keys that are required to evaluate the lazy value.

Pos dataclass

Pos(*, left: Any = None, right: Any = None)

Bases: LazyOperator

A lazy operator for positive.

eval

eval(**values: Any) -> Any

Evaluate the lazy value with the given values.

Parameters:

Name Type Description Default
**values Any

Values to be used for evaluation.

{}

Returns:

Name Type Description
Any Any

The evaluated value.

Raises:

Type Description
ValueError

If the lazy value is not ready to be evaluated.

partial

partial(**values: Any) -> Any

Partially evaluate the lazy value with the given values.

Parameters:

Name Type Description Default
**values Any

Values to be used for evaluation.

{}

Returns:

Name Type Description
Any Any

The partially evaluated value.

ready

ready() -> bool

Check if the lazy value is ready to be evaluated.

keys

keys() -> set[str]

Get the keys that are required to evaluate the lazy value.

Abs dataclass

Abs(*, left: Any = None, right: Any = None)

Bases: LazyOperator

A lazy operator for absolute value.

eval

eval(**values: Any) -> Any

Evaluate the lazy value with the given values.

Parameters:

Name Type Description Default
**values Any

Values to be used for evaluation.

{}

Returns:

Name Type Description
Any Any

The evaluated value.

Raises:

Type Description
ValueError

If the lazy value is not ready to be evaluated.

partial

partial(**values: Any) -> Any

Partially evaluate the lazy value with the given values.

Parameters:

Name Type Description Default
**values Any

Values to be used for evaluation.

{}

Returns:

Name Type Description
Any Any

The partially evaluated value.

ready

ready() -> bool

Check if the lazy value is ready to be evaluated.

keys

keys() -> set[str]

Get the keys that are required to evaluate the lazy value.

Mod dataclass

Mod(*, left: Any = None, right: Any = None)

Bases: LazyOperator

A lazy operator for modulo.

eval

eval(**values: Any) -> Any

Evaluate the lazy value with the given values.

Parameters:

Name Type Description Default
**values Any

Values to be used for evaluation.

{}

Returns:

Name Type Description
Any Any

The evaluated value.

Raises:

Type Description
ValueError

If the lazy value is not ready to be evaluated.

partial

partial(**values: Any) -> Any

Partially evaluate the lazy value with the given values.

Parameters:

Name Type Description Default
**values Any

Values to be used for evaluation.

{}

Returns:

Name Type Description
Any Any

The partially evaluated value.

ready

ready() -> bool

Check if the lazy value is ready to be evaluated.

keys

keys() -> set[str]

Get the keys that are required to evaluate the lazy value.

FloorDiv dataclass

FloorDiv(*, left: Any = None, right: Any = None)

Bases: LazyOperator

A lazy operator for floor division.

eval

eval(**values: Any) -> Any

Evaluate the lazy value with the given values.

Parameters:

Name Type Description Default
**values Any

Values to be used for evaluation.

{}

Returns:

Name Type Description
Any Any

The evaluated value.

Raises:

Type Description
ValueError

If the lazy value is not ready to be evaluated.

partial

partial(**values: Any) -> Any

Partially evaluate the lazy value with the given values.

Parameters:

Name Type Description Default
**values Any

Values to be used for evaluation.

{}

Returns:

Name Type Description
Any Any

The partially evaluated value.

ready

ready() -> bool

Check if the lazy value is ready to be evaluated.

keys

keys() -> set[str]

Get the keys that are required to evaluate the lazy value.