Message256922
| 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:15 | serhiy.storchaka | set | recipients:
+ serhiy.storchaka, rhettinger, python-dev, eric.snow |
| 2015年12月23日 16:16:15 | serhiy.storchaka | set | messageid: <1450887375.03.0.48660180672.issue25410@psf.upfronthosting.co.za> |
| 2015年12月23日 16:16:15 | serhiy.storchaka | link | issue25410 messages |
| 2015年12月23日 16:16:14 | serhiy.storchaka | create |
|