3 ms·
I did that analysis a day ago when this topic came up previously, at https://news.ycombinator.com/item?id=15136961 https://news.ycombinator.com/item?id=15136961
by eesmith 9y ago
I did that analysis a day ago when this topic came up previously, at https://news.ycombinator.com/item?id=15136961 https://news.ycombinator.com/item?id=15136961 .
There are 13 locations in the standard library where a namedtuple was used to replace a tuple, where making them non-indexable would break code.
There are 8 locations where it's used as a shorter way to write a simple class. My point in that thread was that namedtuple should never be used this way.
- gvx 9y agoI think namedtuple is a terrible hack that never should have been (at least not this way), but changing it is going to be a PITA.
- deleted 9y ago[deleted]