Skip to main content

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

NameTypeRequired
Description
val_defaultAnyThe candidate of the default value. It will be preferred if existing.
val_default_factoryAnyThe candidate of the default factory. If the default value does not exist, will attempt to format the default value from it.

Returns

NameType
Description
v_1str

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.