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
I'd personally be able to get rid of a lot of boilerplate (either at call sites or as __init__ methods) from my classes if attrs allowed me to supply a conversion callable with my attr.ibs.
The coerce argument (naming to be bikeshedded) would be called with the value passed in after validation, and the return value would be used as the actual attribute value.
Would such a feature be accepted as a patch?
The text was updated successfully, but these errors were encountered:
I'd personally be able to get rid of a lot of boilerplate (either at call sites or as
__init__
methods) from my classes if attrs allowed me to supply a conversion callable with myattr.ib
s.e.g.
The
coerce
argument (naming to be bikeshedded) would be called with the value passed in after validation, and the return value would be used as the actual attribute value.Would such a feature be accepted as a patch?
The text was updated successfully, but these errors were encountered: