Serhiy Storchaka added the comment: Following code prints X([(1, 1), (3, 3)]) on 3.4 and X([(0, 0), (1, 1), (2, 2), (3, 3), (4, 4)]) on 3.5+.
from collections import OrderedDict class X(OrderedDict): def __iter__(self): for k in OrderedDict.__iter__(self): if k % 2: yield k od = X((i, i) for i in range(5)) print(od.copy()) ---------- _______________________________________ Python tracker <rep...@bugs.python.org> <http://bugs.python.org/issue25410> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com