# scenic.core.lazy_eval¶

Support for lazy evaluation of expressions and specifiers.

## Summary of Module Members¶

Functions

 makeDelayedFunctionCall Utility function for creating a lazily-evaluated function call. makeDelayedOperatorHandler needsLazyEvaluation requiredProperties toDelayedArgument valueInContext Evaluate something in the context of an object being constructed.

Classes

 DelayedArgument Specifier arguments requiring other properties to be evaluated first. LazilyEvaluable Values which may require evaluation in the context of an object being constructed.

## Member Details¶

class LazilyEvaluable(requiredProps)[source]

Bases: object

Values which may require evaluation in the context of an object being constructed.

If a LazilyEvaluable specifies any properties it depends on, then it cannot be evaluated to a normal value except during the construction of an object which already has values for those properties.

evaluateIn(context)[source]

Evaluate this value in the context of an object being constructed.

The object must define all of the properties on which this value depends.

evaluateInner(context)[source]

Actually evaluate in the given context, which provides all required properties.

class DelayedArgument(requiredProps, value)[source]

Specifier arguments requiring other properties to be evaluated first.

The value of a DelayedArgument is given by a function mapping the context (object under construction) to a value.

makeDelayedFunctionCall(func, args, kwargs)[source]

Utility function for creating a lazily-evaluated function call.

valueInContext(value, context)[source]

Evaluate something in the context of an object being constructed.