2 ms·
Watched the whole thing. Very articulate speaker, thanks! Btw. going through your older posts > Besides immutability, what are the advantages of using namedtu
by jstimpfle 10y ago
Watched the whole thing. Very articulate speaker, thanks!
Btw. going through your older posts
> Besides immutability, what are the advantages of using namedtuples instead of dicts?
fixed attributes. And they are ordered! :-)
Makes sets / db-style programming so much simpler:
for user, name, account in users:
...
You can do that with conventional tuples as well, but they can't match the introspectability and the value for documentation.