3 ms·
> I disagree: tuples are meant to act as “records“ (as in a database or other set of data), which are neither lists nor homogeneous. Indeed, hence `namedtuple`
by masklinn 14y ago
> I disagree: tuples are meant to act as “records“ (as in a database or other set of data), which are neither lists nor homogeneous.
Indeed, hence `namedtuple` (named tuples extend tuples). The author got it exactly backwards: tuples are generally heterogenous, the (rare) cases of homogenous tuples are reflexive short lists and hope of a slightly cheaper creation cost.