Skip to content

Accessing @attr.s() decorator parameter values #602

@energizah

Description

@energizah

In #python today someone wanted to find out if their class was frozen. Cls.__dataclass_params__ keeps the @dataclasses.dataclass() arguments.

_DataclassParams(init=True,repr=True,eq=True,order=False,unsafe_hash=False,frozen=True)

Is there a way to get that data in attrs?

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions