Boris Borcic wrote:

> I believe that in this case native linguistic intuition made the decision...

The reason has nothing to do with language. Guido didn't
want sum() to become an attractive nuisance by *appearing*
to be an obvious way of joining a list of strings, while
actually being a very inefficient way of doing that.

Considerable effort was put into trying to make sum()
smart enough to detect when you were using it on a
list of strings and do "".join behind the scenes, but
Guido decided in the end that it wasn't worth the
trouble, given that he only ever intended sum() to
be used on numbers in the first place.

--
Greg
_______________________________________________
Python-Dev mailing list
Python-Dev@python.org
http://mail.python.org/mailman/listinfo/python-dev
Unsubscribe: 
http://mail.python.org/mailman/options/python-dev/archive%40mail-archive.com

Reply via email to