3 ms·
>An instance of namedtuple is actually the Correct (tm) solution. Do you have an implementation to support that? Because a comment from TFA shows that's actual
by Redoubts 13y ago
>An instance of namedtuple is actually the Correct (tm) solution.
Do you have an implementation to support that? Because a comment from TFA shows that's actually the worst idea in cpython.
http://lukauskas.co.uk/articles/2014/02/13/why-your-python-runs-slow-part-1-data-structures/#comment-1242618646 http://lukauskas.co.uk/articles/2014/02/13/why-your-python-r...
- anaphor 13y agoSorry, which comment are you referring to? All I see is a footnote saying "One would be right to argue that collections.namedtuple() is even closer to C struct than this. Let’s not overcomplicate things, however. The point I’m trying to make is valid regardless" which doesn't really say it's a bad idea, just that he didn't decide to talk about it in that article.