Daniel Stutzbach <[email protected]> added the comment:

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.

----------
nosy: +stutzbach

_______________________________________
Python tracker <[email protected]>
<http://bugs.python.org/issue13804>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to