Using attrs for everything in Python
It feels a bit hampered by &quot;bad&quot; design decisions to me<p>I think its safe to say that the current view of what decorators do is, a) filter things going to functions (so they error, or hit a cache), or b) register a function with another library (e.g. flask path decorator)<p>This library does a lot more than that, so it seems that maybe a metaclass (which exists to mutate the class&#x27;s creation) would be more appropriate?<p>This seems to act as a __init__ replacement, but it would be cool to act as a __init__ assistant (in other words, run the attr.s __init__, then run the user defined __init__)<p>The ordering of attrs matters a bit more than one would expect, not only does it define the attribute order for creating a new instance, it also defines the order of attributes when sorting against other classes. You would not want a id=attr.ib() at the top of the class definition, where it most makes sense!<p>The ordering of attrs is done through the .ib() call itself (which gives itself a number, and increments a global counter). This is a way of doing it, and practically might be the best way (it won&#x27;t lead to any inconsistencies within a class), but it still feels weird<p>I personally won&#x27;t use it, but I might make a competitor to it for personal use