pg.InferredValue¶
Accessible via pg.InferredValue
, pg.symbolic.InferredValue
.
- class InferredValue[source]¶
Bases:
pg.Object
,pg.Inferentiable
Base class for inferred values.
Methods:
custom_apply
(*args, **kwargs)Custom apply on a value based on its original value spec.
- custom_apply(*args, **kwargs)[source]¶
Custom apply on a value based on its original value spec.
- Return type:
- Parameters:
path – KeyPath of current object under its object tree.
value_spec – Original value spec for this field.
allow_partial – Whether allow partial object to be created.
child_transform – Function to transform child node values into their final values. Transform function is called on leaf nodes first, then on their parents, recursively.
- Returns:
- A tuple (proceed_with_standard_apply, value_to_proceed).
If proceed_with_standard_apply is set to False, value_to_proceed will be used as final value.
- Raises:
Error when the value is not compatible with the value spec. –