Skip to content

How to use function return value as a field efault value #19

@ca1f

Description

@ca1f

Hi,

in Python the dataclass type supports calling a factory function to retrieve the default value for a field. For more information you can see here. The parameter is named default_factory for the Field descriptor class which is used to declare extra information for each field.

Is it possible to achieve the same functionality with this package?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions