[Python-Dev] [slighly OT] Native speakers and hurting brains

Greg Ewing greg.ewing at canterbury.ac.nz
Sat Jul 8 01:40:34 CEST 2006


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


More information about the Python-Dev mailing list