You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
_pool = attr.ib(default=attr.Factory(list)) is what I use.
Maybe I could support init=False such that it’s actually impossible to pass values for it? In my internal software I don’t care and just don’t pass anything, but if you’re building public APIs I see the value.
OTOH, I have written custom __init__s before. In the end it’s more readable than giving 1000s of options and variations to hit every single edge-case.
Given that
attrs
doesn't allow composing with a custom__init__
, there is no way to initialize mutable implementation details.For example,
can't be expressed with attrs.
The text was updated successfully, but these errors were encountered: