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 mbussonn, methane, vstinner, xiang.zhang
Date 2016-09-09.14:06:53
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <CAEfz+Ty-RBUtfuGOuGcSX05UMaijiR+2ZqNog6HfPN7noD0APQ@mail.gmail.com>
In-reply-to <1473420228.99.0.655116370934.issue28040@psf.upfronthosting.co.za>
Content
> 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.
History
Date User Action Args
2016-09-09 14:06:53methanesetrecipients: + methane, vstinner, xiang.zhang, mbussonn
2016-09-09 14:06:53methanelinkissue28040 messages
2016-09-09 14:06:53methanecreate