Author haypo
Recipients haypo, inada.naoki, python-dev, rhettinger, serhiy.storchaka
Date 2016-09-08.17:02:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <>
Hi INADA Naoki, we discuss a lot about your compact dict change at the current Python core dev sprint. We *all* want your change in Python 3.6!

I looked at the code and I found some minor issues, but sadly I'm very busy right now with soooo many other topics. I proposed to just push your change *right now* (before Python 3.6 feature freeze, scheduled for this week-end with the first beta) but "polish" the code later. I made a tiny change to not hardcode PyDictKeysObject.dk_indices size (8).

I plan to write more documentations about the implementation and add some assertions, because right now it's quite hard to see the overall picture and understand details. I already started to write some doc locally.

I discussed with Eric Snow about the PEP 468 (preserve keyword ordering). He asked me the remove the sentence from the change, because he is going to rephrase his PEP to replace "OrderedDict" with "ordered mapping" (don't be specific on the type). But technically it's true that compact dict preserves the keyword order, so implement the PEP :-)

I pushed the latest patch using intXX_t types.

I made another change: I skipped test_gdb which failed because wasn't updated for the new dict: I opened the issue #28023 to try to not forget to do it. I already worked on this file, so I can try to update the gdb plugin.

I also added "_PyDict_Dummy() function has been removed." to the commit message ;-)

Congrats Naoki and thanks!


TODO: The compact dict is not documented in What's New in Python 3.6. It would be nice to run some benchmarks and compare the memory usage to give some exciting numbers.
Date User Action Args
2016-09-08 17:02:04hayposetrecipients: + haypo, rhettinger, inada.naoki, python-dev, serhiy.storchaka
2016-09-08 17:02:03hayposetmessageid: <>
2016-09-08 17:02:03haypolinkissue27350 messages
2016-09-08 17:02:03haypocreate