Message151483
If I'm understanding Martin Häcker's code correctly, the list comprehension equivalent is:
self.questions = [topic.questions for topic in self.topics]
The reduce() variants are not only much harder to read, but they will take O(n**2) operations because they create an O(n) list O(n) times. |
|
Date |
User |
Action |
Args |
2012-01-17 19:42:35 | stutzbach | set | recipients:
+ stutzbach, amaury.forgeotdarc, eric.araujo, dwt |
2012-01-17 19:42:34 | stutzbach | set | messageid: <1326829354.98.0.476997337245.issue13804@psf.upfronthosting.co.za> |
2012-01-17 19:42:34 | stutzbach | link | issue13804 messages |
2012-01-17 19:42:34 | stutzbach | create | |
|