Isn’t the whole point of named tuples to not iterate over indexes, but to iterate over field names instead, e.g employee.name, employee.salary?
You can also use typing.namedtuple as a baseclass for your classes to have the same functionality .
You can also use typing.namedtuple as a baseclass for your classes to have the same functionality .
zip(x._fields, x)
I get your point that it's not just a built in method though.