Message111197
At least equally useful would be the mention that __iter__ can be a generator, eliminating the need for intermediate objects:
>>> class C:
... def __iter__(self):
... yield 1
... yield 2
...
>>> list(C())
[1, 2] |
|
Date |
User |
Action |
Args |
2010-07-22 17:33:35 | pitrou | set | recipients:
+ pitrou, georg.brandl, rhettinger, amaury.forgeotdarc, eric.araujo, r.david.murray, ysj.ray, andersk |
2010-07-22 17:33:35 | pitrou | set | messageid: <1279820015.44.0.798479302915.issue8376@psf.upfronthosting.co.za> |
2010-07-22 17:33:33 | pitrou | link | issue8376 messages |
2010-07-22 17:33:33 | pitrou | create | |
|