3 ms·
Recordtype for Python: mutable namedtuple with default values
- maciej 15y agoWhat about performance? One of the reasons to use namedtuple is performance, esp. memory-wise (afaiu nametuple stores field names in class definition, which can save a lot of space compared to lists of dicts). I would expect recordtype to be better than dict but not as good as namedtuple. It would be nice if author posted some benchmarks…