get_field_default
FunctionSource
v_1: str = get_field_default(val_default: Any, val_default_factory: Any)
Format the given value as a string that can be used as the default field of a field (DocField).
Arguments
Requires
| Name | Type | Required | |
|---|---|---|---|
val_default | Any | The candidate of the default value. It will be preferred if existing. | |
val_default_factory | Any | The candidate of the default factory. If the default value does not exist, will attempt to format the default value from it. |
Returns
| Name | Type | |
|---|---|---|
v_1 | str | The value that can be filled as the default value of a field. If it is empty, the field does not have the default configuration. |