Reference 〉 Function

Param.set(valstr|bool|num, itemstrNone)

Sets the value of the parameter. Should not be called directly; use model.param() instead.

WARNING: This is an internal function. Its use in user code is not recommended or supported, and its signature can change in future updates without warning. Use one of the suggested functions above instead, if applicable.

Parameters

  • val str|bool|num, required

    The value to set the parameter to. Variable type depends on the parameter type: str for a menu, a bool for a checkbox, or a num for a slider.

  • item str, optional

    If the parameter is a per-good or per-breed parameter, this argument must be set to specifiy which good or breed to set the parameter value for. Otherwise the function raises a KeyError.

    Default value: None

Notes and Examples

  1. Contribute a Note

    Your email address will not be published. Required fields are marked *

    You may use limited HTML for formatting. Please embed blocks of code in <pre><code> </code></pre> tags.