Author Mark.Shannon
Recipients Mark.Shannon, inada.naoki, josh.r, louielu, r.david.murray, rhettinger, serhiy.storchaka, tim.peters, vstinner, xiang.zhang
Date 2019-03-12.20:11:42
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
In general, I agree with Raymond that this is likely to counter-productive.

But let's not guess, let's measure :)

I expect that there are few live empty dicts at any time for most programs. In which case there is no point in any change that attempts to save memory use for empty dicts.

But I could be wrong. If there commonly are lots of live empty dicts,
then some sort of optimisation could be appropriate.

I should also add that dict.clear() uses a key-sharing dict to avoid allocation, because PyDict_Clear() is a void function so there is no way to handle an allocation failure.
Date User Action Args
2019-03-12 20:11:42Mark.Shannonsetrecipients: + Mark.Shannon, tim.peters, rhettinger, vstinner, r.david.murray, inada.naoki, serhiy.storchaka, josh.r, xiang.zhang, louielu
2019-03-12 20:11:42Mark.Shannonsetmessageid: <>
2019-03-12 20:11:42Mark.Shannonlinkissue30040 messages
2019-03-12 20:11:42Mark.Shannoncreate