Author serhiy.storchaka
Recipients eric.snow, python-dev, rhettinger, serhiy.storchaka
Date 2015-12-23.16:16:14
SpamBayes Score -1.0
Marked as misclassified Yes
Message-id <1450887375.03.0.48660180672.issue25410@psf.upfronthosting.co.za>
In-reply-to
Content
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())
History
Date User Action Args
2015-12-23 16:16:15serhiy.storchakasetrecipients: + serhiy.storchaka, rhettinger, python-dev, eric.snow
2015-12-23 16:16:15serhiy.storchakasetmessageid: <1450887375.03.0.48660180672.issue25410@psf.upfronthosting.co.za>
2015-12-23 16:16:15serhiy.storchakalinkissue25410 messages
2015-12-23 16:16:14serhiy.storchakacreate