Skip to content

Extended properties #535

@andvikt

Description

@andvikt

It would be a cool feature to have properties that participate in asdict method.

@attr.s
class SomeClass:

  @attr.property(asdict=True)
  def some_dynamic_attr(self):
    return True

print(asdict(SomeClass()))
>> {'some_dynamic_attr': True}

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions