INADA Naoki added the comment: > Xiang Zhang added the comment: > > Are you sure INADA? The previous dict implementation has the same constraint > but does merge in dict_pop. >
Yes. New dict implementation preserves insertion order. class A: ... a, b = A(), A() a.a, a.b, a.c = 1, 2, 3 b.a, b.b, b.c = 4, 5, 6 del a.b # or a.pop('b') a.b = 7 assert list(a.__dict__) == ["a", "c", "b"] assert list(b.__dict__) == ["a", "b", "c"] This is difficult for key-sharing dict (aka. split table). We may be able to allow some simple del and pop operation for split table. But we should keep best balance between simplicity and efficiency. And we don't have enough time before 3.6b1. ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue28040> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com