Message86658
To flatten lists of lists, e.g. [[0], [1], [2], ...], I found the short
and quite python-like one-liner "sum(listoflists, [])". This, however,
has absolutely awful performance: while the equivalent way of iterating
by hand and extending a flat list is longer and uglier, it performs fast
and in linear time. The sum() variant takes unacceptably long. I do not
know why this should behave worse-than-linear... |
|
Date |
User |
Action |
Args |
2009-04-27 12:10:47 | sjohn | set | recipients:
+ sjohn |
2009-04-27 12:10:47 | sjohn | set | messageid: <1240834247.59.0.00160840317188.issue5855@psf.upfronthosting.co.za> |
2009-04-27 12:10:46 | sjohn | link | issue5855 messages |
2009-04-27 12:10:45 | sjohn | create | |
|