best cumulative sum

bonono at gmail.com bonono at gmail.com
Wed Nov 23 11:46:12 EST 2005


David Isaac wrote:
> OK, this might do it.  But is a generator "better"?
> (I assume accuracy is the same, so what about speed?)
>
I have the slightest idea. So long it works for me and is not too hard
to understand and has no obvious speed problem, I don't care too much.
I believe in line is in general faster, especially you don't call other
function too much.

I like to use generator/list because I find it easier to understand and
it is more BD(bondage and discipline) which save me a few occasions of
subtle errors.




More information about the Python-list mailing list