Guido van Rossum <guido@python.org> writes: > But still, what should sum([]) do? It should raise a ValueError("no values to sum"). In practice, I expect it won't matter, because users will typically have values to sum. If they don't, telling them to write sum(L or [0]) is easy enough. There should be preferably only one obvious way to do it. Regards, Martin
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4