[issue25949] Lazy creation of __dict__ in OrderedDict

2017-04-24 Thread Jesús Cea Avión
Changes by Jesús Cea Avión : -- nosy: +jcea ___ Python tracker ___ ___ Python-bugs-list mailing

[issue25949] Lazy creation of __dict__ in OrderedDict

2015-12-26 Thread Camilla Montonen
Camilla Montonen added the comment: Hi Serhiy, I tried to see whether the patch's unit test in test_ordered_dict.py would fail when the changes to odictobject.c were not applied and it did not. The code change to test_ordered_dict.py does not appear to test the fact that a dict is not

[issue25949] Lazy creation of __dict__ in OrderedDict

2015-12-25 Thread Serhiy Storchaka
New submission from Serhiy Storchaka: For now OrderedDict always creates an empty dict for __dict__. >>> from collections import OrderedDict >>> import gc >>> gc.get_referents(OrderedDict()) [{}] >>> class OD(OrderedDict): pass ... >>> gc.get_referents(OD()) [, {}] But dict subclasses (as