On Wed, Feb 23, 2011 at 4:57 PM, Michael Hanselmann <han...@google.com> wrote:
> Am 23. Februar 2011 10:41 schrieb René Nussbaumer <r...@google.com>:
>> +  results = jex.GetResults()
>> +  bad_cnt = sum(1 for (success, _) in results if not success)
>
> Please use len(), not sum().

Please make up your mind then :). Either you want me to use a
generator for memory optimization or your want me to use len(). Both
are not working together, because generators do not have a length.
Which make sense as a generator can generate an infinite amount of
data where a len wouldn't work on (hint: Fibonacci sequence to call a
well known example). So what do you want me to do?

Thanks for the review! :)

René

Reply via email to