FB:
> def add_r( sums, r ): return sums[0]+r['F1'], sums[1]+r['F2']
> sum_f1, sum_f2 = reduce( add_r, rec, (0,0) )
> result = sum_f1/sum_f2

Until this feature vanishes I think it's better to use it (untested):

add_r = lambda (a, b), r: (a + r['F1'], b + r['F2'])

Bye,
bearophile
--
http://mail.python.org/mailman/listinfo/python-list

Reply via email to