Gareth McCaughan wrote:
> That is: if you're writing code that expects sum() to do something
> sensible with lists of strings, you'll usually need it to do something
> sensible with *empty* lists of strings -- but that isn't possible,
> because there's only one empty list and it has to serve as the empty
> list of integers too.
That is indeed the reason for the explicit start value - sum() needs to
know what to return when the supplied iterable is empty.
Cheers,
Nick.
--
Nick Coghlan | [EMAIL PROTECTED] | Brisbane, Australia
---------------------------------------------------------------
http://www.boredomandlaziness.org
_______________________________________________
Python-3000 mailing list
[email protected]
http://mail.python.org/mailman/listinfo/python-3000
Unsubscribe:
http://mail.python.org/mailman/options/python-3000/archive%40mail-archive.com