In article <[EMAIL PROTECTED]>, Paul Rubin <http://[EMAIL PROTECTED]> wrote: >Robin Becker <[EMAIL PROTECTED]> writes: >> >>>>>reduce(operator.add,a) >> ... >That's what I hoped "sum" would do, but instead it barfs with a type >error. So much for duck typing.
sum(...) sum(sequence, start=0) -> value If you're using sum() as a 1-level flatten you need to give it start=[]. -- \S -- [EMAIL PROTECTED] -- http://www.chaos.org.uk/~sion/ ___ | "Frankly I have no feelings towards penguins one way or the other" \X/ | -- Arthur C. Clarke her nu becomeþ se bera eadward ofdun hlæddre heafdes bæce bump bump bump
-- http://mail.python.org/mailman/listinfo/python-list