3 ms·
"They are the result of the Python community's wish to have an easier way to write classes in the standard library that doesn't carry the problems of namedtuple
by pmoriarty 7y ago
"They are the result of the Python community's wish to have an easier way to write classes in the standard library that doesn't carry the problems of namedtuples."
What are the problems of namedtuples?
- j88439h84 7y agoSee the why-attrs link above.
- hermitdev 7y agoIIRC, one of the biggest complaint is about performance. namedtuples are not known to be fast, but I think performance has gotten better in more recent Python versions. This is just what I recall from reading PEPs, the email lists and release notes. My recollection may not be entirely accurate.