Skip to content

operator

Classes:

Name Description
Add

A lazy operator for addition.

Sub

A lazy operator for subtraction.

Mul

A lazy operator for multiplication.

TrueDiv

A lazy operator for true division.

Pow

A lazy operator for exponentiation.

Neg

A lazy operator for negation.

Pos

A lazy operator for positive.

Abs

A lazy operator for absolute value.

Mod

A lazy operator for modulo.

FloorDiv

A lazy operator for floor division.

Add dataclass

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

Bases: LazyOperator

A lazy operator for addition.

Methods:

Name Description
eval

Evaluate the lazy value with the given values.

partial

Partially evaluate the lazy value with the given values.

ready

Check if the lazy value is ready to be evaluated.

keys

Get the keys that are required to evaluate the lazy 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.

Sub dataclass

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

Bases: LazyOperator

A lazy operator for subtraction.

Methods:

Name Description
eval

Evaluate the lazy value with the given values.

partial

Partially evaluate the lazy value with the given values.

ready

Check if the lazy value is ready to be evaluated.

keys

Get the keys that are required to evaluate the lazy 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.

Mul dataclass

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

Bases: LazyOperator

A lazy operator for multiplication.

Methods:

Name Description
eval

Evaluate the lazy value with the given values.

partial

Partially evaluate the lazy value with the given values.

ready

Check if the lazy value is ready to be evaluated.

keys

Get the keys that are required to evaluate the lazy 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.

TrueDiv dataclass

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

Bases: LazyOperator

A lazy operator for true division.

Methods:

Name Description
eval

Evaluate the lazy value with the given values.

partial

Partially evaluate the lazy value with the given values.

ready

Check if the lazy value is ready to be evaluated.

keys

Get the keys that are required to evaluate the lazy 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.

Pow dataclass

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

Bases: LazyOperator

A lazy operator for exponentiation.

Methods:

Name Description
eval

Evaluate the lazy value with the given values.

partial

Partially evaluate the lazy value with the given values.

ready

Check if the lazy value is ready to be evaluated.

keys

Get the keys that are required to evaluate the lazy 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.

Neg dataclass

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

Bases: LazyOperator

A lazy operator for negation.

Methods:

Name Description
eval

Evaluate the lazy value with the given values.

partial

Partially evaluate the lazy value with the given values.

ready

Check if the lazy value is ready to be evaluated.

keys

Get the keys that are required to evaluate the lazy 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.

Pos dataclass

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

Bases: LazyOperator

A lazy operator for positive.

Methods:

Name Description
eval

Evaluate the lazy value with the given values.

partial

Partially evaluate the lazy value with the given values.

ready

Check if the lazy value is ready to be evaluated.

keys

Get the keys that are required to evaluate the lazy 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.

Abs dataclass

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

Bases: LazyOperator

A lazy operator for absolute value.

Methods:

Name Description
eval

Evaluate the lazy value with the given values.

partial

Partially evaluate the lazy value with the given values.

ready

Check if the lazy value is ready to be evaluated.

keys

Get the keys that are required to evaluate the lazy 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.

Methods:

Name Description
eval

Evaluate the lazy value with the given values.

partial

Partially evaluate the lazy value with the given values.

ready

Check if the lazy value is ready to be evaluated.

keys

Get the keys that are required to evaluate the lazy 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.

FloorDiv dataclass

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

Bases: LazyOperator

A lazy operator for floor division.

Methods:

Name Description
eval

Evaluate the lazy value with the given values.

partial

Partially evaluate the lazy value with the given values.

ready

Check if the lazy value is ready to be evaluated.

keys

Get the keys that are required to evaluate the lazy 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.