[issue19640] Dynamically generate the _source attribute of namedtuple to save memory)

2017-07-17 Thread Giampaolo Rodola'
Changes by Giampaolo Rodola' : -- nosy: +giampaolo.rodola ___ Python tracker ___ ___ Python-bugs-list mailing list Unsubscribe: https

[issue19640] Dynamically generate the _source attribute of namedtuple to save memory)

2014-04-02 Thread Raymond Hettinger
Raymond Hettinger added the comment: Victor, I don't think the added complexity is worth 2k per named tuple class. Every time I've gone down the path of lazy evaluation, I've paid an unexpected price for it down the road. If the savings were huge, it might be worth it, but that isn't the cas

[issue19640] Dynamically generate the _source attribute of namedtuple to save memory)

2014-03-20 Thread Raymond Hettinger
Raymond Hettinger added the comment: The size of the _source attribute is about 2k per namedtuple class: >>> from collections import namedtuple >>> Response = namedtuple('Response', ['code', 'msg', 'compressed', 'written']) >>> len(Response._source) 2174 --

[issue19640] Dynamically generate the _source attribute of namedtuple to save memory)

2014-03-20 Thread Raymond Hettinger
Changes by Raymond Hettinger : -- priority: normal -> low title: Drop _source attribute of namedtuple (waste memory) -> Dynamically generate the _source attribute of namedtuple to save memory) ___ Python tracker _