On Jun 14, 3:37 pm, Dustan <[EMAIL PROTECTED]> wrote:
> Which can then be converted into a generator expression (round
> brackets instead of square brackets) to avoid the intermediate list:
> len((i for i in a_list if a_callable(i)))

Sorry for the excess of posts everybody.

I just realized that the generator expression would not work. I'm not
sure how else could be implemented efficiently and without using up
memory besides by accumulating the count as your earlier example shows.

-- 
http://mail.python.org/mailman/listinfo/python-list

Reply via email to