attrs
attrs copied to clipboard
Python Classes Without Boilerplate
I am learning to use the `attrs` package and I have two questions to ask: 1. When using 'converter' to modify the input type when creating a property, it will...
Hi, I'm not sure if this is a bug or a "feature" that is documented somewhere. At least, I haven't encountered it before, so I thought I'd better double-check. Is...
Today I stumbled over this one: ``` from attrs import define,field from dataclasses import dataclass @define class N1: foo:int|None = field(default=None) class N2: foo:int|None = None def __init__(self, foo): self.foo...
I have been trying to implement a reactive change notification system on top of `attrs` using `on_setattr` handlers. However, `on_setattr` handlers are called *before* the value is assigned, in order...
I love this library. It lets me write classes without writing boilerplate that would take a lot of time. However, I am a very curious person, and I'd like to...
Hi, I know that hashing is a complicated topic and I've seen the sections in the docs / API reference + the resources linked therein. However, I'm still somewhat unclear...
While #1451 added support for forward references in the classes themselves, forward references in converter functions still fail due to the use of `inspect.signature` which by default uses `Format.VALUE` when...
Hi, I fear that there is probably a super obvious answer to this question, but I somehow cannot wrap my head around it: is there any way how I can...