This issue tracker has been migrated to GitHub, and is currently read-only.
For more information, see the GitHub FAQs in the Python's Developer Guide.

Author vstinner
Recipients methane, python-dev, rhettinger, serhiy.storchaka, vstinner
Date 2016-09-08.17:02:03
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1473354123.97.0.630275723969.issue27350@psf.upfronthosting.co.za>
In-reply-to
Content
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 python-gdb.py 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.
History
Date User Action Args
2016-09-08 17:02:04vstinnersetrecipients: + vstinner, rhettinger, methane, python-dev, serhiy.storchaka
2016-09-08 17:02:03vstinnersetmessageid: <1473354123.97.0.630275723969.issue27350@psf.upfronthosting.co.za>
2016-09-08 17:02:03vstinnerlinkissue27350 messages
2016-09-08 17:02:03vstinnercreate