pg.is_deterministic¶
Accessible via pg.is_deterministic
, pg.symbolic.is_deterministic
.
- is_deterministic(x)[source]¶
Returns if the input value is deterministic.
Example:
@pg.symbolize def foo(x, y): pass assert pg.is_deterministic(1) assert pg.is_deterministic(foo(1, 2)) assert not pg.is_deterministic(pg.oneof([1, 2])) assert not pg.is_deterministic(foo(pg.oneof([1, 2]), 3))
- Return type:
- Parameters:
x – Value to query against.
- Returns:
True if value itself is not NonDeterministic and its child and nested child fields do not contain NonDeterministic values.