Skip to content

Add support for InitVar #9

@mthuurne

Description

@mthuurne

The InitVar annotation defines a value that is passed as an argument to __init__() and then to __post_init__() but does not exist as a field on the dataclass instance. This is roughly the opposite of init=False, where the field does exist but there is no matching argument of __init__().

As there is an __init__() argument, we could actually bind values to it. But the Binder specialization needs to be extended to support it.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions