3 ms·
I have never used namedtuple in the manner you describe. I always use it as an easy way to create what is essentially a new data type with a bunch of named fiel
by scott_s 9y ago
I have never used namedtuple in the manner you describe. I always use it as an easy way to create what is essentially a new data type with a bunch of named fields. This is also what I understand to be the normal use case for it.
And I agree with the criticisms: if namedtuple is slow, but so useful that it's all over the place, perhaps we should extend the language to allow these kinds of easy-to-create data types.