Yes. As mentioned on attrs docs, Namedtuples have some limitations over attrs. But for the simple use, where you just have to give names to your fields and want a faster solution, I think Namedtuples are the way to go.
Namedtuples are ultimately just Tuples, they are not supposed to be used as some replacement for classes.
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Yes. As mentioned on
attrs
docs,Namedtuples
have some limitations overattrs
. But for the simple use, where you just have to give names to your fields and want a faster solution, I think Namedtuples are the way to go.Namedtuples are ultimately just
Tuples
, they are not supposed to be used as some replacement for classes.