Author inada.naoki
Recipients inada.naoki, r.david.murray, serhiy.storchaka, xiang.zhang
Date 2017-04-12.00:06:47
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
> I mean creating a solo empty dict doesn't seem to make much sense. Although it saves memory, but when it's populated, it's resized and the memory occupation comes back.

But sometimes it's not populated.

class A:
    def __init__(self, **kwargs):
        self._extra = kwargs

xa = [A() for _ in range(1000)]

So problem is (a) how many empty dicts, and (b) how much memory this patch saves.

> And this makes PyDict_New() hard to understand. :-(

Yes, but it is not new complexity because it's same to d.clear().
Date User Action Args
2017-04-12 00:06:48inada.naokisetrecipients: + inada.naoki, r.david.murray, serhiy.storchaka, xiang.zhang
2017-04-12 00:06:48inada.naokisetmessageid: <>
2017-04-12 00:06:48inada.naokilinkissue30040 messages
2017-04-12 00:06:47inada.naokicreate