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 methane
Recipients arigo, aronacher, eric.snow, methane, rhettinger, serhiy.storchaka
Date 2017-09-11.05:59:26
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1505109567.12.0.8436911544.issue31265@psf.upfronthosting.co.za>
In-reply-to
Content
> Original Raymond's design didn't preserve ordering during deletion.

Original Raymond's pure Python implementation rebuilds index table.
Without it, proving can be very long or infinite loop.
See L89-92 in http://code.activestate.com/recipes/578375/
Strictly speaking, it's worst case is O(n) too.

Raymond's compact dict allocates entry table and index table separately.
I want to allocate them at once, as one memory block.
It makes better cache hit ratio on small dict.

That's why I choose "preserve insertion order" over "compaction".
Since index table and entry table grow at same time, rebuilding
index table and entry table at once makes sense to me.

Anyway, "namespace is ordered" is Python's language spec now.

class C:
    a = 1
    b = 2
    c = 3
    del a

In this case, C's namespace should {"b": 2, "c": 3}, not {"c": 3, "b": 2}.
History
Date User Action Args
2017-09-11 05:59:27methanesetrecipients: + methane, arigo, rhettinger, aronacher, eric.snow, serhiy.storchaka
2017-09-11 05:59:27methanesetmessageid: <1505109567.12.0.8436911544.issue31265@psf.upfronthosting.co.za>
2017-09-11 05:59:27methanelinkissue31265 messages
2017-09-11 05:59:26methanecreate