Mark Dickinson <dicki...@gmail.com> added the comment:

To sum lists, you need to supply a second argument to sum:

>>> sum([[1, 2], ['x', 'y']], [])
[1, 2, 'x', 'y']

The default value of the second argument is 0, which is why you're seeing 
the TypeError.

----------
nosy: +mark.dickinson
resolution:  -> invalid
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<http://bugs.python.org/issue7176>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
http://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to