On Fri, 16 Oct 2009 11:06:30 -0700, Jon Clements wrote: > For instance, sum(['1', '2', '3']); it's not completely unreasonable for > someone to expect > a result of 6.
This is Python, not Perl -- Python never tries to perform numeric arithmetic on strings. '1'+'2' will return '12' and not 3. It is completely unreasonable to expect sum() to coerce strings to ints when the + operator does not. -- Steven -- http://mail.python.org/mailman/listinfo/python-list